help with text input

hello
I’m in trouble with native text input ( native.newTextField function ).

I’m not able to retrieve text from objects

let’s say the object is:

local usernameTextField = native.newTextField(5,5,90,20, onTextField )

when using usernameTextField.text calling some other function the value is nil.

consider that it happens also when trying with device (iPhone 3Gs with iOS 4.3)

someone can help me? [import]uid: 11400 topic_id: 4567 reply_id: 304567[/import]

I’ve solved by myself, that’s where I was wrong:

as far as I understand native.newTextField cannot be used into a display object

reading documentation at http://developer.anscamobile.com/content/native-ui-features

it is specified that

“Because native textfields are not part of the OpenGL canvas, they do not obey the Corona display object hierarchy”

so I have removed my text input fields from a display tree and now everything is working fine [import]uid: 11400 topic_id: 4567 reply_id: 14585[/import]

Glad you fixed it. Thanks for reporting your solution. [import]uid: 11393 topic_id: 4567 reply_id: 14599[/import]