Hi there,
I am struggling a little bit with using native.showAlert. I can use one quite happily, but sometimes one of my alerts can end up calling another one - at which point my app crashes in the simulator, and I get warnings in the terminal window:
<Error>: kCGErrorIllegalArgument: _CGSFindSharedWindow: WID 1212
I have simplified my code so that you can see exactly what is happening:
1 2 3 4 5 6 7 8 9 10 11 12 | local alert1, alert2 local fAlertClick1, fCallAlert2 fAlertClick1 = function(event) fCallAlert2() end fCallAlert2 = function() alert2 = native.showAlert("Two", "Hello Alert 2", {"OK"}) end alert1 = native.showAlert("One", "Hello Alert 1", {"OK"}, fAlertClick1) |
Chaining alerts crashes on the simulator but try compiling for the Xcode simulator and you'll see that it works fine.
Hoan,
Thats great!!
I hadn't thought to try it in the Xcode simulator (or on the device) for that matter.
Wonderful news, thank you for letting me know
Robin