Quantcast
Channel: Appcelerator Developer Center Q&A Tag Feed (quit)
Viewing all articles
Browse latest Browse all 10

How can I exit my Application via a button?

$
0
0

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?

Viewing all articles
Browse latest Browse all 10

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>