I have gone through all the post I can search on as well as the api. I am having some trouble with this simple task. I just want to save the user inputed text to a variable. Terminal is also telling me that fieldhandler is depreciated. This must be a common task I would appreciate is someone could supply me with a block of there code that works that would be great. I will get it eventually but I have spent more time on this than I like and judging by the number of similar post on here I probably wouldnt be the only one to be grateful in the future [import]uid: 107974 topic_id: 26309 reply_id: 326309[/import]
Example;
[lua]local myVar
function test(event)
if event.phase == “submitted” then
myVar = textBox.text
print (myVar)
end
end
textBox = native.newTextBox( 15, 70, 280, 70 )
textBox.text = “This is a text box”
textBox.isEditable = true
textBox:addEventListener(“userInput”, test)[/lua]
The only difference it rather than adding the listener name in native.newTextBox() you add it as a listener like the last line in the example above.
Peach
[import]uid: 52491 topic_id: 26309 reply_id: 106677[/import]
Thanks Peach I am such a dope at some point I had using the done this without declaring the variable first duh.
Thanks alot BTW I really like your style of teaching in your tutorials very helpful for the non programers just learning.
Rick [import]uid: 107974 topic_id: 26309 reply_id: 106721[/import]
Hey Rick-
Not a dope at all; it’s a very easy mistake to make.
Thanks for the kind words, it’s always nice to hear someone has enjoyed my tutes 
Peach [import]uid: 52491 topic_id: 26309 reply_id: 106856[/import]