second test box won't show up =(

Hey there,

I’m working on this app and my second textField won’t show up when I have the 1st on un-commented.  If i comment the 1st one out if shows up.  Can someone help me please!!

[lua]---------------------------------------------------------------------------------
– SCENE NAME
– Scene notes go here

local storyboard = require( “storyboard” )
local scene = storyboard.newScene()

– Clear previous scene
storyboard.removeAll()

– local forward references should go here –


– BEGINNING OF YOUR IMPLEMENTATION

– Called when the scene’s view does not exist:
function scene:createScene( event )
local group = self.view
local baseImage = display.newImageRect( “images/baseimage.jpg”, display.contentWidth, display.contentHeight )
baseImage.x = display.contentCenterX
baseImage.y = display.contentCenterY

group:insert( baseImage )

local createAccountBtn = display.newImageRect( “images/createaccount.png”, 300, 55 )
createAccountBtn.x = display.contentCenterX/1.8
createAccountBtn.y = display.contentCenterY*1.87

local useAsGuestBtn = display.newImageRect( “images/useasguest.png”, 300, 55 )
useAsGuestBtn.x = display.contentCenterX*1.5
useAsGuestBtn.y = display.contentCenterY*1.87

local checkMarkBtn = display.newImageRect( “images/checkmarkbutton.png”, 90 , 90 )
checkMarkBtn.x = display.contentCenterX*1.8
checkMarkBtn.y = display.contentCenterY*1.36

local facebookButton = display.newImageRect( “images/facebookbutton.png”, 510, 100 )
facebookButton.x = display.contentCenterX
facebookButton.y = display.contentCenterY*1.64

–local inputBg = display.newImage( “images/textbutton1.png”, 50, 55)
–inputBg.x = display.contentCenterX*1.2
–inputBg.y = display.contentCenterY*1.277
–inputBg.width = 300
–inputBg.height = 55
–group:insert( inputBg )

local inputUsername = native.newTextField( 20, 80, 500, 106 )
inputUsername.x = display.contentCenterX*1.2
inputUsername.y = display.contentCenterY*1.277
inputUsername.setTextColor(0,0,0)
inputUsername.size = 20
inputUsername.font = native.newFont( “PTSans-Regular” ,40 )
inputUsername.align = “center”
–inputUsername.hasBackground = false
group:insert( inputUsername)

local inputPassword = native.newTextField( 20, 80, 500, 106 )
inputPassword.x = display.contentCenterX*1.2
inputPassword.y = display.contentCenterY*1.44
inputPassword.setTextColor(0,0,0)
inputPassword.size = 20
inputPassword.font = native.newFont( “PTSans-Regular” ,40 )
inputPassword.align = “center”
–inputUsername.hasBackground = false
–group:insert( inputPassword)

local function onTapCA(event)
storyboard.gotoScene( “Scene15”)
end
createAccountBtn:addEventListener( “tap” , onTapCA )

local function onTapUAG(event)
storyboard.gotoScene( “Scene2” )
end
useAsGuestBtn:addEventListener( “tap”, onTapUAG )

group:insert( createAccountBtn )
group:insert( useAsGuestBtn )
group:insert( checkMarkBtn )
group:insert( facebookButton )
group:insert( inputPassword)

end

– Called BEFORE scene has moved onscreen:
function scene:willEnterScene( event )
local group = self.view

end

– Called immediately after scene has moved onscreen:
function scene:enterScene( event )
local group = self.view

end

– Called when scene is about to move offscreen:
function scene:exitScene( event )
local group = self.view

end

– Called AFTER scene has finished moving offscreen:
function scene:didExitScene( event )
local group = self.view

end

– Called prior to the removal of scene’s “view” (display view)
function scene:destroyScene( event )
local group = self.view

end

– Called if/when overlay scene is displayed via storyboard.showOverlay()
function scene:overlayBegan( event )
local group = self.view
local overlay_name = event.sceneName – name of the overlay scene

end

– Called if/when overlay scene is hidden/removed via storyboard.hideOverlay()
function scene:overlayEnded( event )
local group = self.view
local overlay_name = event.sceneName – name of the overlay scene

end


– END OF YOUR IMPLEMENTATION

– “createScene” event is dispatched if scene’s view does not exist
scene:addEventListener( “createScene”, scene )

– “willEnterScene” event is dispatched before scene transition begins
scene:addEventListener( “willEnterScene”, scene )

– “enterScene” event is dispatched whenever scene transition has finished
scene:addEventListener( “enterScene”, scene )

– “exitScene” event is dispatched before next scene’s transition begins
scene:addEventListener( “exitScene”, scene )

– “didExitScene” event is dispatched after scene has finished transitioning out
scene:addEventListener( “didExitScene”, scene )

– “destroyScene” event is dispatched before view is unloaded, which can be
– automatically unloaded in low memory situations, or explicitly via a call to
– storyboard.purgeScene() or storyboard.removeScene().
scene:addEventListener( “destroyScene”, scene )

– “overlayBegan” event is dispatched when an overlay scene is shown
scene:addEventListener( “overlayBegan”, scene )

– “overlayEnded” event is dispatched when an overlay scene is hidden/removed
scene:addEventListener( “overlayEnded”, scene )


return scene[/lua]

Are you getting any errors in your console log?

I don’t see any errors coming up.  Also they both work separately, whichever one is in front shows up the other wont.   

If they are drawing at the same place, you’re only going to see one.  It doesn’t look like you’re drawing them at the same place, so what is likely is that an error is causing that chunk of code to abort when you have the first one enabled, but the error happens somewhere after creating the first one and before creating the 2nd one.

But if you’re getting no errors, I’m not sure.

Rob

yea i just copied the 1st one then changed the variable name and moved it down

Here is a link to all the files

http://jimenezbakery.net84.net/Study%20Abroad/

Are you getting any errors in your console log?

I don’t see any errors coming up.  Also they both work separately, whichever one is in front shows up the other wont.   

If they are drawing at the same place, you’re only going to see one.  It doesn’t look like you’re drawing them at the same place, so what is likely is that an error is causing that chunk of code to abort when you have the first one enabled, but the error happens somewhere after creating the first one and before creating the 2nd one.

But if you’re getting no errors, I’m not sure.

Rob

yea i just copied the 1st one then changed the variable name and moved it down

Here is a link to all the files

http://jimenezbakery.net84.net/Study%20Abroad/