I use the following code for each function for the addEventListener of my text fields. I have one scene that has 50 text fields and I hate to make 50 functions. Is there any way to write one to use for all?
My concern is for the transition.to line how will it know what the y value will be to move it up on the screen?
Thanks,
Warren
local function onPurchPrice( event ) if ( "began" == event.phase ) then transition.to( editGroup, { time=350, x=0, y=0, onComplete=listener1 } ) elseif ( "editing" == event.phase ) then local txt = event.text if(string.len(txt)\>50)then txtPurchPrice.text = string.sub(txt, 1, 50) end elseif ( "submitted" == event.phase ) then native.setKeyboardFocus( nil ) transition.to( editGroup, { time=350, x=0, y=0, onComplete=listener1 } ) end end