how to intercept cmd + Q

Tiemo Hollmann TB toolbook at kestner.de
Mon Jan 28 03:52:16 EST 2013


Hello,

before closing my program I do some cleanups. I call my cleanup handler in
the closestack handler. Now there are three ways to close my app on a mac.

1.       My app has a own menu where the user can choose "exit". The
closestack handler is called, everything is fine

2.       The User can use the close box in the title bar of my app. First
the closestackrequest and second the closestack handler are called.
Everything is fine.

3.       The user can choose "exit myApp" from the apple menu (or Cmd + Q).
The closestack is called as well, but it seems like a "force quit" because
my cleanup handler don't run to it's end, before the app is closed.

 

Btw. "Alt + F4" on windows works fine. My cleanups come to their end.

 

How do you intercept the "Apple quit" (3) to close your app the same way
like being closed "from within" (1/2)?

Thanks for any hints

Tiemo

 

 

 




More information about the use-livecode mailing list