I’m following the code from here - http://docs.coronalabs.com/api/library/native/newTextField.html and have the below:
[lua]
local input = native.newTextField(inputbg.x + 5,inputbg.y +15, inputbg.width - 10, inputbg.height -20)
input.userInput = textListener
input:addEventListener( “userInput”, input )
[/lua]
This does not register any events in the textListener Function however if i change it to the below, it seems to work
[lua]
local input = native.newTextField(inputbg.x + 5,inputbg.y +15, inputbg.width - 10, inputbg.height -20, textListener)
[/lua]
Any ideas what i’m doing wrong? All this is currently being done in createScene