input text field

For some reason I cannot write in the Text field of this code or any other input text field from other demos…

local defaultField

local function textListener( event )

    if ( event.phase == “began” ) then

        – user begins editing text field

        print( event.text )

    elseif ( event.phase == “ended” ) then

        – text field loses focus

    elseif ( event.phase == “ended” or event.phase == “submitted” ) then

        – do something with defaulField’s text

    elseif ( event.phase == “editing” ) then

        print( event.newCharacters )

        print( event.oldText )

        print( event.startPosition )

        print( event.text )

    end

end

– Create our Text Field

defaultField = native.newTextField( 150, 150, 180, 30 )

defaultField:addEventListener( “userInput”, textListener )

What version of Corona are you using?
What operating system are you on?

Are you building for the device or trying this in the simulator?

Its the starter version. …taking it for a spin. It is running on windows 7 using Corona Simulator 2013.2100(2013.12.7)

The Windows simulator cannot show native.textFields and native.textBoxes because we are an OpenGL based app and Microsoft does not permit native objects and OpenGL objects to co-exist in the same window.  

Rob

Ah… Thanks!

Know anything about generating random text and numbers? like a password. If it is possible. I’d like to assign each character a display image. or is it possible to show images randomly… which is really the goal.

I just found my answer about random generating. God bless google!

What version of Corona are you using?
What operating system are you on?

Are you building for the device or trying this in the simulator?

Its the starter version. …taking it for a spin. It is running on windows 7 using Corona Simulator 2013.2100(2013.12.7)

The Windows simulator cannot show native.textFields and native.textBoxes because we are an OpenGL based app and Microsoft does not permit native objects and OpenGL objects to co-exist in the same window.  

Rob

Ah… Thanks!

Know anything about generating random text and numbers? like a password. If it is possible. I’d like to assign each character a display image. or is it possible to show images randomly… which is really the goal.

I just found my answer about random generating. God bless google!