help with text input

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?

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

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

Glad you fixed it. Thanks for reporting your solution.

views:1199 update:2011/10/4 8:06:35
corona forums © 2003-2011