here is the promised code:
define
Code:
var newEvent;
newEvent = Core.system.compile("param", "return new Event(param)");
someplace and add this to target.ExitQuit
Code:
target.ExitQuit = function () {
var ev, func, menuBar;
ev = newEvent(2048);
menuBar = this.findContent("MENUBAR"); // menuBar had to be defined as MENUBAR in XML!!
// this.bubble("tracelog","findContent= "+menuBar);
func = Core.system.getSoValue(menuBar,"endLoop");
// this.bubble("tracelog","endLoop= "+func);
func.call(menuBar,ev);
kbook.autoRunRoot.exitIf(kbook.model);
}
This will do the trick in the SIM, hop it's working on device too.