What works with a save and then a exit from the app:
function onMenuItem(item) {
if (item == :save) {
mySessionHandler.save();
// To exit the app
Ui.popView(Ui.SLIDE_IMMEDIATE);
// System.exit() causes !IQ ...
}
}
Adding a progress bar and I'll have to introduce two more popView's to exit the app. A System.exit() causes !IQ in simulator:
function onMenuItem(item) {
if (item == :save) {
Ui.pushView(new WatchUi.ProgressBar("Processing...", null ), null, Ui.SLIDE_DOWN);
mySessionHandler.save();
// To pop the progressBar
Ui.popView(Ui.SLIDE_IMMEDIATE);
// To pop the menu
Ui.popView(Ui.SLIDE_IMMEDIATE);
// To exit the app
Ui.popView(Ui.SLIDE_IMMEDIATE);
// System.exit() causes !IQ ...
}
}
Why do I have to introduce two more popViews, is it because the first case was a bug since it actually seems resonable based on the view stack?
How come the System.exit() does not work? Is it because I'm in a MenuInputDelegate?
Latest released SDK (2.4.2) using fenix3HR and 1.4.x for the Simulator