Below is my code for a very simple text field.
I see the word “Hello” and a textField on my Droid and when I touch the textField the keyboard shows but when I type something and touch “Go” nothing happens.
Can anyone tell me why this is not working? This is basically from examples from the Corona site.
local text = “Hello”
local t = display.newText(text, 20, 30, null, 36)
t:setTextColor(255,255,255)
local function handlerFunction( event )
local text = “event.phase = function called”
local t = display.newText(text, 20, 30, null, 36)
t:setTextColor(255,255,255)
if ( “began” == event.phase ) then
local text = “event.phase = began”
local t = display.newText(text, 20, 30, null, 36)
t:setTextColor(255,255,255)
elseif ( “ended” == event.phase ) then
local text = “event.phase = ended”
local t = display.newText(text, 20, 30, null, 36)
t:setTextColor(255,255,255)
elseif ( “submitted” == event.phase ) then
local text = “event.phase = submitted”
local t = display.newText(text, 20, 30, null, 36)
t:setTextColor(255,255,255)
end
end
topicField = native.newTextField( 50, 150, 220, 72, handlerFunction )
topicField.inputType = “default”
[import]uid: 4637 topic_id: 1647 reply_id: 301647[/import]