calling removeScene from overlay causes an error within hideOverlay

in all of my modules, I have removeScene in the scene:hide->will phase to generate a complete initialization whenever I reenter the module.   I placed this in an overlay, and when exiting the overlay with hideOverlay, it properly calls scene:hide->will,  in which I pass back to the parent some data.  The last thing I do in that phase is call composer.removeScene.   After it gets called, I get an error with no real data.  The small stack trace shows the error being within hideOverlay, trying to access “view” which is nil.

removing the call to removeScene - “solves” the problem.  Other than the obvious error, should I not be calling removeScene in an overlay?  or does this indicate some other extraneous problem that I should be looking for?

thanks

dave

You should not remove the scene you are overlaying in an overlay.

i.e. If you are showing sceneA, then you load overlayB, don’t remove sceneA.

I’m not. I have module A, call showOverlay with overlay1. Call hideOverlay in Overlay1 when complete. In overlay1->scene:hide->will, I pass data to the parent (module A) and call removeScene to force recycling - or atleast get scene:create called on reentry of the overlay.

ShowOverlay and hideOverlay may be treated differently than gotoScene. If so, removeScene wouldn’t be needed. My concern is that it is needed and I’ve stepped on something else and this is where it is showing up.

Thanks for the reply.

Dave

You should not remove the scene you are overlaying in an overlay.

i.e. If you are showing sceneA, then you load overlayB, don’t remove sceneA.

I’m not. I have module A, call showOverlay with overlay1. Call hideOverlay in Overlay1 when complete. In overlay1->scene:hide->will, I pass data to the parent (module A) and call removeScene to force recycling - or atleast get scene:create called on reentry of the overlay.

ShowOverlay and hideOverlay may be treated differently than gotoScene. If so, removeScene wouldn’t be needed. My concern is that it is needed and I’ve stepped on something else and this is where it is showing up.

Thanks for the reply.

Dave