No luck with trapping QUIT in OSX
Shari
gypsyware at earthlink.net
Fri Jan 10 16:45:00 EST 2003
Putting the appleEvent handler in the frontScript didn't work. I
tried putting that appleEvent handler EVERYWHERE, to no avail. It
didn't work in the frontScript, the main stack script, the embedded
(operating) stack script. I'm guessing that the frontScript gets
deleted before the message gets to it.
I tried trapping the closeStack and shutDown messages, to run my
doQuit handler. It works perfectly in Classic, as it runs thru the
menuPick handler and is trapped there, but that blasted menu change
the OSX makes, breaks it. Seems to bypass every handler I've got.
I ran a test, to see if the shutDown and closeStack messages are
called during this quit, and they are. But the doQuit handler is
not. I tried inserting "send doQuit to cd fld 1 of cd 1 of stack
sideStack" into the closeStack handler, and it did not run. I am
guessing that the global sideStack is deleted immediately during the
quit sequence in OSX? There are several handlers that are set to run
at quit, to save a lot of data first.
Such a simple thing... to save your data before quitting. Why does
OSX make it so difficult??
(Because they are trying to copy WINDOZE)
:-)
Shari C
--
--Shareware Games for the Mac--
http://www.gypsyware.com
More information about the metacard
mailing list