order for storyboard callbacks willEnterScene and didExitScene has changed?

Hey aisaksen.

Unless the storyboard version in v926 in corona enterprise differed from the one used in the standard version of corona.

I tested on the normal version of corona on 926 (and 894) and got the same incorrect scene event order as you described.

If you didn’t, would you mind emailing me a simple test case that shows otherwise? my email is danny [at] coronalabs.com

Thanks again. [import]uid: 84637 topic_id: 33002 reply_id: 132178[/import]

I will email you the test case now. Its basically just the default App that corona builds, with some prints added, and willEnterScene and didExitScene added to both views. It does the correct behavior in Corona Simulator on 926 (not just enterprise). [import]uid: 122310 topic_id: 33002 reply_id: 132238[/import]

What is the intended sequencing of the scene events? This is something I’ve been wondering about for some time.

Is it meant to work as the following once the bug is fixed?:

A.willEnterScene
A.enterScene
A.exitScene
A.didExitScene
B.willEnterScene
B.enterScene
B.exitScene
B.didExitScene [import]uid: 105707 topic_id: 33002 reply_id: 132251[/import]

yes, this is how its supposed to work:

A.willEnterScene
A.enterScene
A.exitScene
A.didExitScene
B.willEnterScene
B.enterScene
B.exitScene
B.didExitScene

This is pretty important because otherwise you end up with a situation where the peak memory Mem(A) + Mem(B) since there is a time where both modes are active. It also makes things much simpler for libraries that should be only active for one mode at a time. [import]uid: 122310 topic_id: 33002 reply_id: 132425[/import]

@aisaksen, I appreciate you confirming that sequence.

I’ve been plagued by an intractable problem that crashes the system and I suspect it relates to external modules getting referenced in funky sequencing by the storyboard API.

@Danny, any word as to when daily builds will kick off again? I would love to make sure that I’m using the API as intended. [import]uid: 105707 topic_id: 33002 reply_id: 132542[/import]

yes, this is how its supposed to work:

A.willEnterScene
A.enterScene
A.exitScene
A.didExitScene
B.willEnterScene
B.enterScene
B.exitScene
B.didExitScene

This is pretty important because otherwise you end up with a situation where the peak memory Mem(A) + Mem(B) since there is a time where both modes are active. It also makes things much simpler for libraries that should be only active for one mode at a time. [import]uid: 122310 topic_id: 33002 reply_id: 132425[/import]

For the visual thinkers. I tested this with 971 and drew it up:

[import]uid: 110228 topic_id: 33002 reply_id: 132647[/import]

@aisaksen, I appreciate you confirming that sequence.

I’ve been plagued by an intractable problem that crashes the system and I suspect it relates to external modules getting referenced in funky sequencing by the storyboard API.

@Danny, any word as to when daily builds will kick off again? I would love to make sure that I’m using the API as intended. [import]uid: 105707 topic_id: 33002 reply_id: 132542[/import]

For the visual thinkers. I tested this with 971 and drew it up:

[import]uid: 110228 topic_id: 33002 reply_id: 132647[/import]

Hi guys,
This issue has been investigated and fixed, and it will be available in one of the next few daily builds.

Thanks,
Brent [import]uid: 200026 topic_id: 33002 reply_id: 135024[/import]

Hi guys,
This issue has been investigated and fixed, and it will be available in one of the next few daily builds.

Thanks,
Brent [import]uid: 200026 topic_id: 33002 reply_id: 135024[/import]

@theokieza:

See the gotchas section here:

http://docs.coronalabs.com/api/library/storyboard/reloadScene.html

“If you intend for a “createScene” event to be dispatched when storyboard.reloadScene() is called, you must explicitly “purge” the scene (using storyboard.purgeScene() or [storyboard.purgeAll()][api.library.storyboard.purgeAll()]) within a “willExitScene” or “exitScene” event listener.”
We plan to make this easier in future revisions of storyboard

[import]uid: 84637 topic_id: 33002 reply_id: 135339[/import]

So now how do I get createScene to fire again?

storyboard.purgeScene does not seem to do it’s job anymore… [import]uid: 134920 topic_id: 33002 reply_id: 135338[/import]

storyboard.purgeScene() was working before, but not after the changes to storyboard. [import]uid: 134920 topic_id: 33002 reply_id: 135340[/import]

I am using storyboard.purgeScene( storyboard.getCurrentSceneName() ) in scene:exitScene.
I will roll back to an earlier version of Corona for the time being.
Thanks for the help so far.

Regards

T [import]uid: 134920 topic_id: 33002 reply_id: 135342[/import]

@theokieza:

Here is a workaround you can use in the meantime (with the latest version of storyboard)

It’s not officially supported so let me know how it works out for you, and again the aim is to fix storyboard so things like this don’t need workarounds.

storyboard.scenes[storyboard.getCurrentSceneName()]:dispatchEvent( { name = "createScene" } ) [import]uid: 84637 topic_id: 33002 reply_id: 135468[/import]

well. with the latest build our game is destroyed and doesn’t work at all!
And older builds force me to use doubtful workarounds.
We want to be able to reload the scene like it was loaded the first time (i.e. purge + reload)

What do you recommend?
What corona build is working like documented?
When exactly will the soryboard API bugs be fixed?

We intend to submit an update of our game as soon as possible so please be quick! [import]uid: 70635 topic_id: 33002 reply_id: 135593[/import]

@Canupa. Can you provide more specific information please?

We know there are a lot of outstanding issues with storyboard, and we will be re-writing the storyboard library from scratch in the new year (Starting work on it in January) with the goal of a more powerful, easier to use and stable library. [import]uid: 84637 topic_id: 33002 reply_id: 135595[/import]

exactly, I’m talking about “lot of outstanding issues”.

in this particular case I’m trying to purge the scene and then reloading/recreating it as if it was loaded for the first time (after the app has started).

When using build .976 I need to delay the storyboard.gotoScene-call after I purged the scene, otherwise the game crashes.

When using build .986 the purging doesn’t work at all and createScene is never invoked.

so the question is: is there a foolproof way to re-create a scene?
[import]uid: 70635 topic_id: 33002 reply_id: 135599[/import]

I just verified that the ordering now works correctly in .987 [import]uid: 122310 topic_id: 33002 reply_id: 135609[/import]