Hi,when my app finished its job,i want to exit it via a button just like
var dialog_success = Titanium.UI.createOptionDialog({ options: ['exit', 'cancel'], title: 'click exit to quit' }); dialog_success.addEventListener('click', function(e){ if (e.index == 0) { //window.close() seems does not work,what can i do here? } });I already set exitOnClose=true
var window = Titanium.UI.createWindow({ title: "how can i clost myself?", backgroundColor: 'black', exitOnClose:true });can anyone give me some advice?