Storyboard Troubles

I’m having major problems with Storyboard. I get error-looking messages in my console.

In the console, it appears as following whenever I activate a listener that plays my storyboard feature:

[lua]

–On Startup

Runtime error

?:0: attempt to concatenate global ‘sceneName’ (a nil value)

stack traceback:

    ?: in function ‘gotoScene’

    c:users\shacx\documents\corona project\ill try v 2\main.lua:6: in

main chunkRuntime error

–After clicking the switch on the welcome screen

?:0: attempt to concatenate global ‘sceneName’ (a nil value)

stack traceback:

    ?: in function ‘gotoScene’

    c:\users\shacx_001\documents\corona projects\ill trey v 2\ yea.lua:12: in

function (c:\users\shacx_001\documents\corona projects\ill try v 2\yea.lua:11)

     ?: in function (?:221)

[/lua]

My code for the storyboards are:

[lua]

local storyboard = require (“storyboard”)

storyboard.gotoScene(“yea”)

[/lua]

That’s it.

What is the problem with these errors?

First off, you should move to Composer as it is the new scene manager for Corona, and Storyboard is no longer supported.

That being said, these errors usually mean that you don’t have a scene file called (“yea”) in your directory, which would be a problem even when you move to Composer. Can you confirm you have a yea.lua file in the directory, which is setup as another scene file?

Yes, i have a yea.lua file, and it’s spelled the same. Also it does correctly direct to ‘yea.lua’

Judging from the Runtime errors you posted, I would presume it was crashing your app on scene change. Can you confirm that the yea.lua file is set up as a Storyboard scene? If you could post the code, that would help to confirm the issue.

[lua]

local physics = require (“physics”)
physics.start()
local widget = require (“widget”)
local storyboard = require (“storyboard”)
display.setStatusBar( display.TranslucentStatusBar )
local scene = storyboard.newScene()

local rect = display.newRect(100,100,100,100)
rect:setFillColor(1,0,0)

function gotolvl1()
    storyboard.gotoScene(‘lvl1’)
end

rect:addEventListener(“tap”, gotolvl1)

[/lua]

If that is the entirety of your yea.lua file, then it isn’t set up like a normal Storyboard file. There aren’t any createScene/enterScene functions at the absolute least. 

This is the best time to stop using Storyboard, and start using Composer. Here’s the documentation on Composer. You can use the Corona SDK Composer template to open a new Composer scene file and start populating it with your code.

How long before Composer is replaced by The Next Great Thing?  

It’s getting tiresome re-implementing basic things like scene mgmt every time Corona Labs scratches an architectural itch.  

Hi @davemikesell,

I understand your concern, but there is no foreseeable intention to “replace” the Composer API. Storyboard was deprecated in favor of Composer for various reasons, including the fact that its “phases” were overly complex and/or confusing in name/purpose, in addition to the fact that Storyboard lacked certain features which are helpful to developers.

Best regards,

Brent

Thanks, Brent.   Just converted Diver Down, which only has five scenes.   Easier than going from director to storyboard, that’s for sure.  

First off, you should move to Composer as it is the new scene manager for Corona, and Storyboard is no longer supported.

That being said, these errors usually mean that you don’t have a scene file called (“yea”) in your directory, which would be a problem even when you move to Composer. Can you confirm you have a yea.lua file in the directory, which is setup as another scene file?

Yes, i have a yea.lua file, and it’s spelled the same. Also it does correctly direct to ‘yea.lua’

Judging from the Runtime errors you posted, I would presume it was crashing your app on scene change. Can you confirm that the yea.lua file is set up as a Storyboard scene? If you could post the code, that would help to confirm the issue.

[lua]

local physics = require (“physics”)
physics.start()
local widget = require (“widget”)
local storyboard = require (“storyboard”)
display.setStatusBar( display.TranslucentStatusBar )
local scene = storyboard.newScene()

local rect = display.newRect(100,100,100,100)
rect:setFillColor(1,0,0)

function gotolvl1()
    storyboard.gotoScene(‘lvl1’)
end

rect:addEventListener(“tap”, gotolvl1)

[/lua]

If that is the entirety of your yea.lua file, then it isn’t set up like a normal Storyboard file. There aren’t any createScene/enterScene functions at the absolute least. 

This is the best time to stop using Storyboard, and start using Composer. Here’s the documentation on Composer. You can use the Corona SDK Composer template to open a new Composer scene file and start populating it with your code.

How long before Composer is replaced by The Next Great Thing?  

It’s getting tiresome re-implementing basic things like scene mgmt every time Corona Labs scratches an architectural itch.  

Hi @davemikesell,

I understand your concern, but there is no foreseeable intention to “replace” the Composer API. Storyboard was deprecated in favor of Composer for various reasons, including the fact that its “phases” were overly complex and/or confusing in name/purpose, in addition to the fact that Storyboard lacked certain features which are helpful to developers.

Best regards,

Brent

Thanks, Brent.   Just converted Diver Down, which only has five scenes.   Easier than going from director to storyboard, that’s for sure.