(mac) application menu
Marty Knapp
martyknapp at comcast.net
Sat Nov 17 14:04:20 EST 2007
This was driving me crazy too. After messing around with it, I pieced
the following together and it's worked for me (I am using Rev 2.6.1):
on appleEvent pClass,pID,pSender --I got this from Ken Ray's web site
switch (pClass & pID)
case "aevtquit"
answer "Save changes?" with "Don't Save" or "Save"
if it is "Save" then
doSaveStuff
pass appleEvent
else pass appleEvent
break
default
pass appleEvent
break
end switch
end appleEvent
on closeStackrequest
Global homeStack
if the short name of this stack is homeStack then
answer "Save changes?" with "Don't Save" or "Save"
if it is "Save" then
doSaveStuff
end if
end if
pass closeStackrequest
end closeStackrequest
on shutdownRequest --I only use this for Windows
Global homeStack
if the platform contains "Win" then
if the short name of this stack is homeStack then
answer "Save changes?" with "Don't Save" or "Save"
if it is "Save" then
doSaveStuff
end if
end if
end if
pass shutdownRequest
end shutdownRequest
Marty Knapp
More information about the use-livecode
mailing list