Can't trap Quit

Bill Vlahos bvlahos at mac.com
Thu Sep 20 02:07:38 EDT 2007


Arrrg!

So if I put a button on the card and click it after the stack just  
closed with this script:
on mouseUp
   put the defaultStack into vTempStack
   set the defaultStack to vTempStack
end mouseUp

It works.

However, that would require a user to click on it. I put it into the  
following handler which is called by both the closeStackRequest and  
shutdownRequest and it doesn't work.

on preCloseStack
   if the uDirty of stack the uPathToWallet of this stack then --  
vDirty 1 = needs save
     put the defaultStack into vTempStack
     answer "Save the changes?" with "No" or "Yes"
     if it is "Yes" then
       put the uPathToWallet of this stack into pathToWallet
       set the uRect of stack the uPathToWallet of me to the rect of me
       tempSaveStack -- temporary fix for save to thumbdrive bug in  
Rev 2.8.
     else
       set the defaultStack to vTempStack
     end if
   end if
end preCloseStack

Bill Vlahos

On Sep 18, 2007, at 10:48 AM, Ken Ray wrote:

> On Tue, 18 Sep 2007 05:58:53 -0400, Michael Binder wrote:
>
>> I think bug 5362 = 4994.  There is a workaround.  After each
>> Answer Dialog, just reset the defaultstack.
>
> Yup, that was it... thanks! Bill you now know what to do...
>
> :-)
>
>
> Ken Ray
> Sons of Thunder Software, Inc.
> Email: kray at sonsothunder.com
> Web Site: http://www.sonsothunder.com/
> _______________________________________________
> use-revolution mailing list
> use-revolution at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your  
> subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-revolution




More information about the use-livecode mailing list