How do I respond to an autoexit when the application window is closed.
according to the AIR 1.5 docs
"When an exit command is mediated through the operating system by one of these routes, the NativeApplication dispatches an exiting event. If no listeners cancel the exiting event, any open windows are closed. Each window dispatches a closing and then a close event. If any of the windows cancel the closing event, the shut-down process stops."
I have tried adding an event listener in the constructor for the application
AutoExit is set to true, the application terminates when the window close button is used but no EXITING event is recieved therefore onExiting is not executed.
Can someone show me the correct way to do it?
Are you cancelling the event (by calling the preventDefault() method)? The following should work:
NativeApplication.nativeApplication.autoExit = true;
does not work but