for some reason this doesn’t work although is a fairly simple code, if the user press enter on the keyboard and the code is correct send the user to screen2…
by the way the same code works on a handler for a button, but not for the text field.
The same line of code works when in called from another event (a button touch event), and the screen2.lua works as I tested it by setting it as the launch screen from main.lua. I have discarded this two options.
for some reason on this particular screen this line of code is not working so I have moved the removal of screens to the enter event of the screen I am going to, so for example on screen2’s enterScene event I have
storyboard.removeScene(storyboard.getPrevious()) and that seems to work.
I do like to remove screens to clear up memory and to make sure I remove all natives (textfields, etc…)
The same line of code works when in called from another event (a button touch event), and the screen2.lua works as I tested it by setting it as the launch screen from main.lua. I have discarded this two options.
for some reason on this particular screen this line of code is not working so I have moved the removal of screens to the enter event of the screen I am going to, so for example on screen2’s enterScene event I have
storyboard.removeScene(storyboard.getPrevious()) and that seems to work.
I do like to remove screens to clear up memory and to make sure I remove all natives (textfields, etc…)