AW: how to intercept cmd + Q

Tiemo Hollmann TB toolbook at kestner.de
Mon Jan 28 04:38:38 EST 2013


Ok, shutdownnRequest is the answer. I mixed it with closeStackRequest
Thanks
Tiemo

> -----Ursprüngliche Nachricht-----
> Von: use-livecode [mailto:use-livecode-bounces at lists.runrev.com] Im
Auftrag
> von Tiemo Hollmann TB
> Gesendet: Montag, 28. Januar 2013 09:52
> An: 'How to use LiveCode'
> Betreff: how to intercept cmd + Q
> 
> 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
> 
> 
> 
> 
> 
> 
> 
> _______________________________________________
> use-livecode mailing list
> use-livecode at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your
> subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode





More information about the use-livecode mailing list