Intercepting shutdown attempts

2005-04-07 Thread Alex Tweedly
I have an app that needs to save some data before the app quits.
When the users quits from the menu (or shortcut), it's easy - but I 
can't seem to find out if they quit by clicking the 'close' (X) box in 
the window decorations.  I read about shutdown and shutdownrequest 
messages in the docs - so I added handlers for those to the stack's 
script - but they don't seem to be invoked.

The stack script now looks like
on shutdown
 answer shutdown
end shutdown
on shutdownrequest
 answer shutdownrequest
end shutdownrequest
When I quit via the menu (which uses the quit command), it calls the 
shutdownrequest handler - but not when I click on the close (X) icon.

Am I missing something obvious here ?
--
Alex Tweedly   http://www.tweedly.net

--
No virus found in this outgoing message.
Checked by AVG Anti-Virus.
Version: 7.0.308 / Virus Database: 266.9.2 - Release Date: 05/04/2005
___
use-revolution mailing list
use-revolution@lists.runrev.com
http://lists.runrev.com/mailman/listinfo/use-revolution


Re: Intercepting shutdown attempts

2005-04-07 Thread Pat Trendler
on closestackrequest
works for me.
Pat
- Original Message - 
From: Alex Tweedly [EMAIL PROTECTED]
To: How to use Revolution use-revolution@lists.runrev.com
Sent: Thursday, April 07, 2005 10:23 PM
Subject: Intercepting shutdown attempts


I have an app that needs to save some data before the app quits.
When the users quits from the menu (or shortcut), it's easy - but I 
can't seem to find out if they quit by clicking the 'close' (X) box in 
the window decorations.  I read about shutdown and shutdownrequest 
messages in the docs - so I added handlers for those to the stack's 
script - but they don't seem to be invoked.

The stack script now looks like
on shutdown
 answer shutdown
end shutdown
on shutdownrequest
 answer shutdownrequest
end shutdownrequest
When I quit via the menu (which uses the quit command), it calls the 
shutdownrequest handler - but not when I click on the close (X) icon.

Am I missing something obvious here ?
--
Alex Tweedly   http://www.tweedly.net

--
No virus found in this outgoing message.
Checked by AVG Anti-Virus.
Version: 7.0.308 / Virus Database: 266.9.2 - Release Date: 05/04/2005
___
use-revolution mailing list
use-revolution@lists.runrev.com
http://lists.runrev.com/mailman/listinfo/use-revolution
___
use-revolution mailing list
use-revolution@lists.runrev.com
http://lists.runrev.com/mailman/listinfo/use-revolution