Is there a way to get the active textbox name?
Basically I want to pass this name to the keyboard handler, or have the keyboard handler routine detect this through the event.
I dont seem to be having much joy.
In the keyboard event handler I have tried the following
local function KeyboardHandlerMove( event )
if ( "began" == event.phase ) then
event.text="Kjkjkjkjkjk"
event.y=20
print(event.name)
elseif ( "ended" == event.phase ) then
event.text="Kjkjkjkjkjk"
event.y=20
print(event.name)
elseif ( "submitted" == event.phase ) then
event.text="Kjkjkjkjkjk"
event.y=20
print(event.name)
native.setKeyboardFocus( nil )
end
end
txtPhone = native.newTextField( 0, 40, 120, 40, KeyboardHandlerMove )
I have also tried
event.target.text
event.target.id
etc.
The only other way I could think of doing this was to have a local variable called “CurTextBox” and use this as a flag for current textbox. This would be set by assigning a listener to each textbox to set this flag and then passing CurTextBox into the keyboard handler.
I was hoping there was a tidier way to do this.
I would be forever grateful for some insight…well grateful for at least a few hours anyway 
[import]uid: 103163 topic_id: 19548 reply_id: 319548[/import]