Application.enableExitHandler() This page was last modified over 30 day(s) ago and has 0 comment(s)


Back to Application Class Summary

Availability
Windows, Mac OSX, Linux

Usage
mdm.Application.enableExitHandler():void

Parameters
None

Returns
Nothing

Description
When executed, application will catch an external exit command and either call registered listener or handler to that kind of event

Notes
If a user attempts to close the current Form (i.e with the close button or Alt-F4) the Application.onAppExit event will be fired.
The exit handler cannot be disabled.

Example Code
// first enable application exit handler
mdm.Application.enableExitHandler();
// then assign handler to be called on exit attempt
// note that exit handler has to have single argument
mdm.Application.onAppExit = function(event:Event):void {
// do your logic here
// e.g. cleanup and quit
mdm.Application.onAppExit = undefined;
// let other events be processed and quit
setTimeout(mdm.Application.exit, 1);
};

mdm.Application Class Example Downloads
No Example Downloads Available


Registered Users must be logged in to 'MyAccount' to add a Comment - Log In Here
  After Logging In, Click Here to Refresh This Page