Intercepting shutdown attempts

Pat Trendler ptrendler at bigpond.com
Thu Apr 7 09:06:48 EDT 2005


on closestackrequest

works for me.

Pat

----- Original Message ----- 
From: "Alex Tweedly" <alex at tweedly.net>
To: "How to use Revolution" <use-revolution at 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 at lists.runrev.com
> http://lists.runrev.com/mailman/listinfo/use-revolution


More information about the use-livecode mailing list