Force Close

Mac OSX specific forum
spacebuddy
Enthusiast
Enthusiast
Posts: 364
Joined: Thu Jul 02, 2009 5:42 am

Force Close

Post by spacebuddy »

Anyone know how to detect if your application has been closed when someone
uses "Activity Monitor" to kill the application.

Thanks
User avatar
Tenaja
Addict
Addict
Posts: 1959
Joined: Tue Nov 09, 2010 10:15 pm

Re: Force Close

Post by Tenaja »

A quick test showed this...

Case #PB_Event_CloseWindow
MessageRequester("Closing...", "this window: " + Str( GetActiveWindow()))

...to give you the message box if you close it using the control. In windows, however, the program was just halted, and none of the exit commands were executed. I guess that means you can "easily" detect if it is NOT forced closed.
spacebuddy
Enthusiast
Enthusiast
Posts: 364
Joined: Thu Jul 02, 2009 5:42 am

Re: Force Close

Post by spacebuddy »

Yes, if you use the control then it closes, but I am using Activity Monitor to force close the
app which does not work on my system (OS/X Lion).
Post Reply