No, just override shutdown() and return true until the user accepts the prompt. See this example:
http://svn.apache.org/repos/asf/pivot/trunk/tests/src/org/apache/pivot/tests/ShutdownTest.java On Dec 1, 2010, at 10:06 PM, Luiz Gustavo wrote: > Hi Greg, > > I'd like to just show a Prompt to the user, as he tries to close the > application, and as soon as he confirms, the applications exits normally. > WindowStateListener#previewWindowClose() doesn't really help me in that. > I could try Application#shutdown(), because de application is runing in a > desktop. Where would you put that? In the > WindowStateListener#previewWindowClose()? > > Luiz > > > 2010/12/2 Greg Brown <[email protected]> > You could implement WindowStateListener#previewWindowClose(), but that may > not be what you are looking for. I'd try using Application#shutdown(). You > can return true from this method if you want to cancel shutdown (though this > currently only works when you are running in DesktopApplicationContext, not a > browser). > G > > > On Dec 1, 2010, at 8:56 PM, Luiz Gustavo wrote: > >> Hi, >> >> what would be, in Pivot, the equivalent event of >> WindowListener.windowClosing in Swing? >> I'd like to show a message to the user, when he leaves the application. >> >> -- >> Luiz Gustavo S. de Souza >> >> http://luizgustavoss.wordpress.com >> http://luizgustavoss.blogspot.com >> http://twitter.com/lugustso > > > > > -- > Luiz Gustavo S. de Souza > > http://luizgustavoss.wordpress.com > http://luizgustavoss.blogspot.com > http://twitter.com/lugustso
