Hello,
I have a local variable “i” that is given a number which ads up.
If I leave the scene and return to the scene the “i” is not reset to it default value from the top of the code.
Actually none of the code that is outside of the storyboard scene bits is run again.
The module seems to be stored in memory.
Cool, except for the fact that in my main menu I call a storyboard.removeAll() in the enter scene part.
It does not seem to remove the other scene.
So I tried a storyboard.removeScene(sceneName) and if used it works the scene gets cleared.
Cool, except I get the message
[lua]
oefening1-iPhone was not purged because it’s view (display group) does not exist. This means it has already been purged or the view was never created.
[/lua]
So somehow it thinks it didn’t do anything, but the variable “i” has now been reset. SO I get the behaviour I want. Corona just doesn’t seem to know it.
Also shouldn’t storyboard.removeAll() do the same thing? Just without needing to state the scenename?
Also I thought variables that are made local were cleaned by default by storyboard.
using version 2088.