order for storyboard callbacks willEnterScene and didExitScene has changed?

storyboard.showOverlay’s isModal option is now broken (works fine in 928, broken in more recent builds including the most recent)…we are relying on this to work too!

Why can’t you just go back to the storyboard code from 926 when storyboard worked fine? Can’t you just do a diff and undo whatever changes caused all this stuff to break? [import]uid: 122310 topic_id: 33002 reply_id: 135630[/import]

Hey Aisaksen.

That shouldn’t have happened, let me verify that.

Edit: I just did a quick test and I could not interact with any objects below my modal overlay.

How exactly are they broken for you? [import]uid: 84637 topic_id: 33002 reply_id: 135634[/import]

They are broken in that the events that aren’t handled by the overlay get passed down to the lower mode.

so if I’m in mode A, then do showOverlay(“B”, {isModal=true}), then I can still interact with mode A if the touch event isn’t handled by B.

in 926, the lower mode A would correctly not get the touch events [import]uid: 122310 topic_id: 33002 reply_id: 135638[/import]

Can you send me a example of this? danny[at] coronalabs.com

From my testing that doesn’t seem to be the case. That isn’t me saying your making it up, I’m just saying perhaps we are testing this in a different way.
[import]uid: 84637 topic_id: 33002 reply_id: 135639[/import]

Hi Danny,

I just made up a simple test case, and it DOESN’T have the broken behavior, but it certainly does in my game. So I’ll take a closer look and see what might be doing it. I’ll send you something when I get the test case broken in the same way.

-Aaron
[import]uid: 122310 topic_id: 33002 reply_id: 135643[/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]

Hi Danny,

I finally figured out what is doing this. Its an issue when you use crawlspaceLib which overrides newRect with some functions that setup the reference point automatically.

I suspect what is happening is that the newer implementation of isModal puts up a secret invisible rectangle using display.newRect, and captures all the events that go to it. But if you have overridden display.newRect, it ends up putting that rectangle in the wrong place, with the upper left corner in the center of the screen, so only 1/4 of the screen keeps events from poking through.

my work around will just to put in my own rectangle that blocks events in my modal screens, and not rely on the one that corona gives. I can send you reproduction code.

[import]uid: 122310 topic_id: 33002 reply_id: 135934[/import]

storyboard.showOverlay’s isModal option is now broken (works fine in 928, broken in more recent builds including the most recent)…we are relying on this to work too!

Why can’t you just go back to the storyboard code from 926 when storyboard worked fine? Can’t you just do a diff and undo whatever changes caused all this stuff to break? [import]uid: 122310 topic_id: 33002 reply_id: 135630[/import]

Hey Aisaksen.

That shouldn’t have happened, let me verify that.

Edit: I just did a quick test and I could not interact with any objects below my modal overlay.

How exactly are they broken for you? [import]uid: 84637 topic_id: 33002 reply_id: 135634[/import]

They are broken in that the events that aren’t handled by the overlay get passed down to the lower mode.

so if I’m in mode A, then do showOverlay(“B”, {isModal=true}), then I can still interact with mode A if the touch event isn’t handled by B.

in 926, the lower mode A would correctly not get the touch events [import]uid: 122310 topic_id: 33002 reply_id: 135638[/import]

Can you send me a example of this? danny[at] coronalabs.com

From my testing that doesn’t seem to be the case. That isn’t me saying your making it up, I’m just saying perhaps we are testing this in a different way.
[import]uid: 84637 topic_id: 33002 reply_id: 135639[/import]

Hi Danny,

I just made up a simple test case, and it DOESN’T have the broken behavior, but it certainly does in my game. So I’ll take a closer look and see what might be doing it. I’ll send you something when I get the test case broken in the same way.

-Aaron
[import]uid: 122310 topic_id: 33002 reply_id: 135643[/import]