Warn before quit
Shari
gypsyware at earthlink.net
Tue Oct 22 08:34:01 EDT 2002
>Nope, I just searched through my entire script, the only things I
>lock is the screen occasionally, but even that I don't do near where
>I quit.
>
>I created a new stack, and made a quick script in the stack script of:
>on shutDownRequest
>--display an answer dialog, quit if the user clicks "Don't Quit"
>end shutDownRequest
>and when I hit command-Q, it did not pop up. Is my copy of MetaCard
>being weird or something?
>
>Karl
Karl,
Someone probably already asked this, but did you associate command-Q
with the menu item? My Quit menu has the command-Q associated with
it. And in the menuPick handler, the case "Quit" simply calls the
doQuit handler, below.
on doQuit
global gPlayers,thePlayer,dataPath,mySound
put "dontleave.wav,dontgo.wav,leavingme.wav,areyouleaving.wav" into tit
put any item of tit into mySound
playMe
wait until the sound is done
lock messages
go stack "Blackjack Goldie"
unlock messages
send saveData to stack "Blackjack Goldie"
repeat with x = 1 to 7
if x is in gPlayers then
put x into thePlayer
send endPlayer to cd "Blackjack" of stack "Blackjack Goldie"
end if
end repeat
get flushEvents(all)
send quitToFinder to me in 10 ticks
end doQuit
on quitToFinder
quit
end quitToFinder
--
--Shareware Games for the Mac--
http://www.gypsyware.com
More information about the metacard
mailing list