I tried running the example code below and the Output screen says:
“Warning: Native text fields are not currently supported in the simulator. Please build for device.”
So does that mean I have to build it for my device(an ipad) and install it on there EVERY time I want to test?! Is there some other non-native ojbect to use for showing a text field and a keyboard to test user input?
Please help, I am new but like what I’ve seen so far.
Gib
local defaultField local function textListener( event ) if event.phase == "began" then -- user begins editing textField print( event.text ) elseif event.phase == "ended" then -- textField/Box loses focus elseif event.phase == "ended" or event.phase == "submitted" then -- do something with defaulField's text elseif event.phase == "editing" then print( event.newCharacters ) print( event.oldText ) print( event.startPosition ) print( event.text ) end end -- Create our Text Field defaultField = native.newTextField( 10, 30, 180, 30 ) defaultField.userInput = textListener defaultField:addEventListener( "userInput", defaultField )
I don’t understand they are all are getting away with fraudulent claims but that is another matter I guess.