Here's the deal... this following page won't load. However, if I force an error - say setting a text color to a variable that doesn't exist, the page loads. What am I doing wrong? I just get a blank screen with no errors when transitioning to this screen.
Thanks for your help!!
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 | module(..., package.seeall) print("Running ----------> addDecks.lua") local localGroup = display.newGroup() local ui = require("ui") local database = require ("database") local backgrnd = display.newImage( "background_570_380.png", true ) local pagename = display.newText("addDecks.lua", 0, 0, native.systemFontBold, 16) local nameprompt = display.newText("Enter New Deck Name:", 0, 0, native.systemFontBold, 20) local pictureprompt = display.newText("Select New Deck Image:", 0, 0, native.systemFontBold, 20) local function initVars() print("addDecks ... initVars") localGroup:insert(backgrnd) localGroup:insert(pagename) localGroup:insert(nameprompt) localGroup:insert(pictureprompt) backgrnd.x = display.contentWidth / 2 backgrnd.y = display.contentHeight / 2 pagename.x = display.contentWidth / 2 pagename.y = 20 nameprompt.x = display.contentWidth / 2 nameprompt.y = 60 pictureprompt.x = display.contentWidth / 2 pictureprompt.y = 100 pagename:setTextColor( 255,255,255) nameprompt:setTextColor( 255,255,255) pictureprompt:setTextColor( 255,255,255) end function clean ( event ) print("addDecks ... clean") end function new() print("addDecks... Im in the new function!") initVars() return localGroup end |
Here's some prints I added to various files to show the flow. Notice that I have no errors in the console...however, I end up with a blank screen with just my background image.
Director is --------------------LOADING--> mainMaint
deckView ... clean
Director is ------------------UNLOADING--> deckView
ui ... newButtonHandler
mainMain ... buttonAddDecksEvent
ui ... newButtonHandler
mainMain ... buttonAddDecksEvent
Running ----------> addDecks.lua
addDecks... Im in the new function!
addDecks ... initVars
Director is --------------------LOADING--> addDecks
mainMaint ... clean
Director is ------------------UNLOADING--> mainMaint