TextField problems

hey guys…so i have this problem…when i want to create a textfield…it would not appear…can somebody help me?here is the code

[lua]

----intro.lua—

local storyboard=require(“storyboard”)

local widget=require “widget”

widget.setTheme(“theme_ios”)

local scene = storyboard.newScene()

function scene:createScene( event )

------declaration------

local group = self.view

local lblfn = display.newText(“Search:”, 89, 95, native.systemFont, 28)

—create text field-----

local txtfn = native.newTextField(80, 140, 480, 100)

txtfn.size = 20 --character size

txtfn.inputType = “number”

txtfn:addEventListener(“userInput”, txtfn)

----------------bar-----------------------------

local intro=display.newImage(“intro.png”)

local navBarTop = ui.newButton{default = “navBarTop.png”}

navBarTop.x = display.contentWidth*.5

navBarTop.y = math.floor(display.screenOriginY + navBarTop.height*0.5)

local navBar = ui.newButton{default = “navBar.png”}

navBar.x = display.contentWidth*.5

navBar.y = display.contentHeight - navBar.height*0.5

local navHeader = display.newText(“I-MMApps: MySL”, 0, 0, “algerian”, 18)

navHeader:setTextColor(225)

navHeader.x = display.contentWidth*.5

navHeader.y = navBarTop.y


–button function–

–button lesson1

local function goLesson1(self,event)

if event.phase == “began” then

storyboard.gotoScene( “lesson1”, “crossFade”, 400  )

return true

end

end

–ini untuk panggil image dari theme_ios

lesson1 = widget.newButton

{ style=“lesson1”}

lesson1.x=120

lesson1.y=100

–button lesson2

local function goLesson2(self,event)

if event.phase == “began” then

storyboard.gotoScene( “lesson2”, “crossFade”, 400  )

return true

end

end

lesson2 = widget.newButton

{ style=“lesson2”}

lesson2.x=350

lesson2.y=100

–button lesson3

local function goLesson3(self,event)

if event.phase == “began” then

storyboard.gotoScene( “lesson3”, “crossFade”, 400  )

return true

end

end

lesson3 = widget.newButton

{ style=“lesson3”}

lesson3.x=120

lesson3.y=200

–button lesson4

local function goLesson4(self,event)

if event.phase == “began” then

storyboard.gotoScene( “lesson4”, “crossFade”, 400  )

return true

end

end

lesson4 = widget.newButton

{ style=“lesson4”}

lesson4.x=350

lesson4.y=200

–button info

local function goInfo(self,event)

if event.phase == “began” then

storyboard.gotoScene( “intro”, “crossFade”, 400  )

return true

end

end

info = widget.newButton

{ style=“info”}

info.x=450

info.y=18

–button quit

local function goExit(self,event)

if event.phase == “began” then

local function onComplete( event )

if “clicked” == event.action then

local i = event.index

if 1 == i then

                        os.exit() 

elseif 2 == i then

                       

end

end

end

– Show alert

local alert = native.showAlert( “EXIT I-MMAPPS”, “You pressed the quit button. Do you wish to exit?”, 

{ “YES”, “NO” }, onComplete )

end

end

quit = widget.newButton

{ style=“quit”}

quit.x=420

quit.y=300


–SOUND–


group:insert(txtfn)

group:insert(intro)

group:insert(navBarTop)

group:insert(navBar)

group:insert(navHeader)

group:insert(lesson1)

group:insert(lesson2)

group:insert(lesson3)

group:insert(lesson4)

group:insert(info)

group:insert(quit)

lesson1.touch=goLesson1

lesson2.touch=goLesson2

lesson3.touch=goLesson3

lesson4.touch=goLesson4

info.touch=goInfo

quit.touch=goExit

print( “\nmainMenu: createScene event” )

end

function scene:enterScene( mainMenu )

storyboard.purgeAll()

print( “mainMenu: enterScene event” )

end

function scene:exitScene( mainMenu )

print( “mainMenu: exitScene event” )

end

function scene:destroyScene( mainMenu )

print( “destroying mainMenu’s view” )

end

scene:addEventListener( “createScene”, scene )

scene:addEventListener( “enterScene”, scene )

scene:addEventListener( “exitScene”, scene )

scene:addEventListener( “destroyScene”, scene )

return scene

[/lua]

What version of Corona SDK are you using?

What operating system are you running Corona SDK on?

I also do not see any calls to native.newTextField() above or are you talking about just showing text on the screen with display.newText()?

Rob

i am currently using the 2012-971 corona simulator running on windows…

do you mean calling the native like in line 14?

im sorry…im at beginner at this

First, 971 is incredibly old.  The current public build is 2393.  You really should be using the latest build.

As for native.newTextField(), Windows does not permit textFields to work with OpenGL apps.  Since you’re on Windows, you will only be able to test native.newTextField()'s on device.

Rob

okay…thanks rob!

What version of Corona SDK are you using?

What operating system are you running Corona SDK on?

I also do not see any calls to native.newTextField() above or are you talking about just showing text on the screen with display.newText()?

Rob

i am currently using the 2012-971 corona simulator running on windows…

do you mean calling the native like in line 14?

im sorry…im at beginner at this

First, 971 is incredibly old.  The current public build is 2393.  You really should be using the latest build.

As for native.newTextField(), Windows does not permit textFields to work with OpenGL apps.  Since you’re on Windows, you will only be able to test native.newTextField()'s on device.

Rob

okay…thanks rob!