Scrollview Widgets and Storyboard

Hello,

we are in the process of redesigning an app we made with Corona SDK. We are still not sure if we should stay with Corona or move to just native/SpriteKit. We are pinpointing a few issues in our Corona version.

An annoying one we are unable to fix is the way storyboard transitions interact with the scrollview. Even if we nil the scrollview in the DidExit function, it is being removed before the transition begins. Is this a known limitation of widgets when used with storyboard?

Thanks.

By niling you just free reference but scrollview is still there. You probably inserted scrollview into storyboard’s display group (self.view) so behaviour is understandable.
So if scoryboard moves or removes its view then all objects inside follow group.

Hello, thank you.

I do this in didExitScene;

    if scroller then
        scroller:removeSelf()    
        scroller = nil
    end

Scroller is inserted in the scene group (otherwise how could it be transitioned?); other objects inserted in the screen group, like text objects, transition as they are supposed to do.

If the widget.newScrollView() is inserted into the scene’s view/group, then it will get removed when the scene’s view is destroyed.  I’m not sure why you’re trying to remove it in didExitScene() because unless you purseScene() or removeScene() the createScene() won’t be re-executed the next time the scene loads and you won’t have the scrollView.  

I don’t know why storyboard would remove a scrollView before it transition’s the next screen.   Can you produce a simple case that demonstrates this?   Storyboard 2.0 should be coming pretty soon and there have been a lot of re-vamps to it, as well as I’m not sure if you’re using Widgets 2.0.   If we have a filed bug report on it, we can make sure the engineers look into it.

Hello, thanks for your reply.

If I remember correctly, we added this as a protection against possible bugs in Corona SDK, since debugging has been a problem in the past for us in between daily builds. That piece of code is executed only if the scroller has not been removed.

I will see if I can create a very basic example starting from one of your examples in the demos with Corona SDK. If I remember correctly, the issue happens also there.

By niling you just free reference but scrollview is still there. You probably inserted scrollview into storyboard’s display group (self.view) so behaviour is understandable.
So if scoryboard moves or removes its view then all objects inside follow group.

Hello, thank you.

I do this in didExitScene;

    if scroller then
        scroller:removeSelf()    
        scroller = nil
    end

Scroller is inserted in the scene group (otherwise how could it be transitioned?); other objects inserted in the screen group, like text objects, transition as they are supposed to do.

If the widget.newScrollView() is inserted into the scene’s view/group, then it will get removed when the scene’s view is destroyed.  I’m not sure why you’re trying to remove it in didExitScene() because unless you purseScene() or removeScene() the createScene() won’t be re-executed the next time the scene loads and you won’t have the scrollView.  

I don’t know why storyboard would remove a scrollView before it transition’s the next screen.   Can you produce a simple case that demonstrates this?   Storyboard 2.0 should be coming pretty soon and there have been a lot of re-vamps to it, as well as I’m not sure if you’re using Widgets 2.0.   If we have a filed bug report on it, we can make sure the engineers look into it.

Hello, thanks for your reply.

If I remember correctly, we added this as a protection against possible bugs in Corona SDK, since debugging has been a problem in the past for us in between daily builds. That piece of code is executed only if the scroller has not been removed.

I will see if I can create a very basic example starting from one of your examples in the demos with Corona SDK. If I remember correctly, the issue happens also there.