(mac) application menu

Shari shari at gypsyware.com
Wed Nov 14 06:27:24 CST 2007


Couldn't he just capture shutDownRequest?

on shutDownRequest
    cleanUpStuff
end shutDownRequest

on cleanUpStuff
   # do all your special quit things here
   quit # actually quits when you're done saving or changing or whatever
end cleanUpStuff

or...

on cleanUpStuff
   # do all your special quit things here
   pass shutDownRequest # let's Rev handle the shutDownRequest and 
quit as it normally would
end cleanUpStuff



>Hi Peter,
>
>I'm not sure about Problem 2 but regarding Problem 1, you need to 
>trap an AppleEvent in order for a standalone to perform some 
>activities before quitting. For example, put this script in your 
>main stack script and when theClass = "aevt" and theID = "quit", you 
>can successfully trap the program before it quits. eg.
>
>on appleEvent theClass,theID
>   if theClass = "aevt" and theID = "quit" then
>     -- do something
>     quit
>   end if
>end appleEvent
>
>Best Regards,
>
>Mike


-- 
WlND0WS and MAClNT0SH shareware games
BIackjack GoId
http://www.gypsyware.com



More information about the use-livecode mailing list