overlay params?
Does hideOverlay support passing parameters back to the calling scene? For instance, an overlay that pops up a few buttons, and the user presses one... would be nice to get that passed back.
If this is currently not possible, could you consider adding that in a future update?
Replies
Yes... I am finding that as well. So I guess you cannot pass params back to the calling scene from the overlay. CoronaLabs... please consider this. Overlays make a nice pop-up dialog.
schizoid2k - I just checked the docs (http://docs.coronalabs.com/api/library/storyboard/hideOverlay.html) and there is no mention of returning options in the hideOverlay as there is with showOverlay. To be honest I didn't read the hideOverlay before just assumed it would be like showOverlay.
Seems logical - I thought it was a good way to present things like buttons, pickerwheel, etc. Get the user input and pass the info back. I do it now with gotoScene. What methods are others using to pop up to get user input ?
Docs are like toilet paper - don't need it till your in the pooh - then you REALLY need it.
dbl clicked
You *could* attach your own data to the storyboard object in your overlay, something like:
storyboard.myReturnedButton="button1"
...and then in the overlayEnded function in the calling module check the value
1 2 3 4 5 6 | function scene:overlayEnded(event) local group = self.view; local overlay_name = event.sceneName; print(storyboard.myReturnedButton); end |
@ingemar... that's exactly what I am doing now. I create a return variable in the storyboard object.
Would be nice to have params returned though... seems like a cleaner approach.
Agreed. Would be cleaner...



I second this. I was just going to write something and saw this post.
I have this in my overlay scene:
Then in my calling scene I have this:
I thought this should have the passed text, but get nothing back and get this:
scene1.lua:57: attempt to index local 'params' (a nil value)
thanks for any help.