I’m having a weird problem with native.showAlert(), that began when I upgraded to SDK 2013.2076
After re-optimizing my app, changing everything that was deprecated (Migration Guide 2.0), etc. this seems to be the only thing bogging me down.
What’s happening is here is, I have an alert that I want to show up when the scene is done loading – enterScene. I place the alert there, and when I run the app, (going through the previous 6 scenes before this 7th current scene) the alert pops up just fine. Except I keep getting this WARNING message:
2013-11-24 18:11:37.273 Corona Simulator[945:507] WARNING: The simulator does not support simultaneous alerts via native.showAlert(). If an alert is shown, subsequent calls will be ignored.
2013-11-24 18:11:37.274 Corona Simulator[945:507] WARNING: The simulator does not support simultaneous alerts via native.showAlert(). If an alert is shown, subsequent calls will be ignored.
2013-11-24 18:11:37.274 Corona Simulator[945:507] WARNING: The simulator does not support simultaneous alerts via native.showAlert(). If an alert is shown, subsequent calls will be ignored.
2013-11-24 18:11:37.274 Corona Simulator[945:507] WARNING: The simulator does not support simultaneous alerts via native.showAlert(). If an alert is shown, subsequent calls will be ignored.
2013-11-24 18:11:38.424 Corona Simulator[945:507] WARNING: The simulator does not support simultaneous alerts via native.showAlert(). If an alert is shown, subsequent calls will be ignored.
Yes, that is the full terminal output that results from just one alert, that it apparently doesn’t like! lol.
So, I spent hours, two full days working at such an peculiar problem. I made a small sample project isolating the problem. All of my code between the original project, and the problem testing project is exactly the same, minus some extraneous, cinematic detail that wouldn’t effect the problem, it basically just cuts to the chase. All variables are set the same way, and same goes for calling all functions that were called during said scenes.
What I came to find out was that whether I put the alert inside of the createScene() portion, or enterScene portion of storyboard, that weird warning (those warnings, I should add) did not occur. This applies to the problem tester app. For some reason, and I feel like it could my doing, or the upgrade, since this problem never happened with my prior build, 2013.1202. The funny thing about this is that I have other alerts during my game. So I wanted to see if this msg only happens with the “first alert” that the app encounters, ignoring the rest. I commented the problem alert out, and let the app run until the next alert, which gave no warning/problematic output. So it has something to do with this current scene, I believe.
“Why does he care if the app still works, its just a warning.” you might add.
What happens is, when I build the app, and put it to my Android phone, when it gets to the said scene, it displays 5 alerts, stacked upon each other. So it takes 5 clicks or taps, of the ‘ok’ button until I get to fully see and interact with the display objects, that were created in createScene().
After a full day of endless research and failed attempts, I finally got the problem fixed. I simply moved my alert as the last “item” or code, if you will, under the createScene() field. This produced no warning messages. Why would Corona give me a warning, only because I wanted an alert to occur during enterScene()???
The funny thing is, that other alert I talked about earlier that is in a few scenes later in my game, guess what. It is in the enterScene() field, and produces no warning message. That is why I believe there is something wrong with this one scene.
Has anyone had any problems like this? [I really think its me, but I can’t see any mistakes!]
Am I doing something wrong with alerts?
Thanks, I really hope you can help.
Isiah.