Skip navigation
exerter
Currently Being Moderated

Clean up task before terminating app

Jun 12, 2010 2:07 PM

How can i perform certain clean up task before exiting after the user click 'x' or alt-f4?

 

 

function applicationExit(){ 
    var exitingEvent = new air.Event(air.Event.EXITING, false, true);
    air.NativeApplication.nativeApplication.dispatchEvent(exitingEvent);
    if (!exitingEvent.isDefaultPrevented()) air.NativeApplication.nativeApplication.exit();
};


I cant really understand this code, i want to load a url before the user really exits the program.

 

More Like This

  • Retrieving data ...

Bookmarked By (0)

Answers + Points = Status

  • 10 points awarded for Correct Answers
  • 5 points awarded for Helpful Answers
  • 10,000+ points
  • 1,001-10,000 points
  • 501-1,000 points
  • 5-500 points