I digged deep into my emails but could not find it so I’ve created one:
#3412
I digged deep into my emails but could not find it so I’ve created one:
#3412
Hi Krystian. The bug report number should have been 5 digits long. Can you verify?
Thanks
Rob
ah sorry
34129
Hi all,
For those having the “params not passed 2nd time” issue, I’m curious about something. Can you please confirm?
When you go to the scene the first time, in which function do you receive the event.params? In :create()?
When you remove the scene, do you pass “true” as the “shouldRecycle” parameter? Doing so means that you do not want the scene to be permanently removed (only recycled).
When you go to the scene again (assuming you recycled it in step #2) are you not getting the event.params in :create()? If so, this is by design and it’s not a bug.
Thanks,
Brent
Brent: I do not recycle the scene and I still don’t get params.
In my case I tried to grab the params in both ‘create’ and ‘show(will and did)’ and even tried forcibly removing the scene in ‘hide’. Still couldn’t get params when going to the scene I was already on.
Maybe the fix is bringing reloadScene back and allowing params in that call.
well the workaround I successfully use is to create a dummy scene, which when loaded goes to the one I want, with parameters, and removes itself.
I’m not a fan of scenes going to themselves. I discussed all of this in the Reloading Storyboard tutorial: http://coronalabs.com/blog/2013/08/20/tutorial-reloading-storyboard-scenes/
Creating a scene to bounce to and back to protect passing parameters seems like more work to me than simply storing the parameters when you need to reload into the scene object and it’s there when it reloads.
Rob
Hi,
I had the same problem, so I’ve switched to “myData” kind of data passing.
Now it works like a charm.
Example:
mydata.lua:
local M = {}
return M
file1.lua:
local myData = require( “mydata” )
myData.variable=25
composer.gotoScene( “file2”, “crossFade” )
file2.lua:
local myData = require( “mydata” )
print(myData.variable)
Best regards!
I currently have the same issue.
event.params is nil if you attempt to go to the scene you are already on and pass params in the options.
Has there been a bug report filed for this? If so, can the filer post the # here so I can check its status?
Thanks,
Brent
I digged deep into my emails but could not find it so I’ve created one:
#3412
Hi Krystian. The bug report number should have been 5 digits long. Can you verify?
Thanks
Rob
ah sorry
34129
Hi all,
For those having the “params not passed 2nd time” issue, I’m curious about something. Can you please confirm?
When you go to the scene the first time, in which function do you receive the event.params? In :create()?
When you remove the scene, do you pass “true” as the “shouldRecycle” parameter? Doing so means that you do not want the scene to be permanently removed (only recycled).
When you go to the scene again (assuming you recycled it in step #2) are you not getting the event.params in :create()? If so, this is by design and it’s not a bug.
Thanks,
Brent
Brent: I do not recycle the scene and I still don’t get params.
In my case I tried to grab the params in both ‘create’ and ‘show(will and did)’ and even tried forcibly removing the scene in ‘hide’. Still couldn’t get params when going to the scene I was already on.
Maybe the fix is bringing reloadScene back and allowing params in that call.
well the workaround I successfully use is to create a dummy scene, which when loaded goes to the one I want, with parameters, and removes itself.
I’m not a fan of scenes going to themselves. I discussed all of this in the Reloading Storyboard tutorial: http://coronalabs.com/blog/2013/08/20/tutorial-reloading-storyboard-scenes/
Creating a scene to bounce to and back to protect passing parameters seems like more work to me than simply storing the parameters when you need to reload into the scene object and it’s there when it reloads.
Rob