I am implementing a confirmation dialog on exit, so capturing the escape key like this:
case Ui.KEY_ESC: var dialog = new Ui.Confirmation("Are you sure you want to exit?"); Ui.pushView( dialog, new AppExitConfirmationDelegate(), Ui.SLIDE_IMMEDIATE); return true; break;
Using this confirmation delegate:
class AppExitConfirmationDelegate extends Ui.ConfirmationDelegate { function onResponse(response) { if (response == Ui.CONFIRM_YES) { // If user confirmed, proceed with exit Ui.popView(Ui.SLIDE_IMMEDIATE); } } }
It works in the simulator on all devices.
It works on some devices I have (e.g. 830 is fine) but on the edge 540 when i click the escape button to "CONFIRM_NO" the program exits anyway.
I believe this is a bug.