home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.sys.mac.programmer
- Path: sparky!uunet!zaphod.mps.ohio-state.edu!sdd.hp.com!spool.mu.edu!agate!apple!mumbo.apple.com!gallant.apple.com!seuss.apple.com!user
- From: absurd@apple.apple.com (Tim Dierks, software saboteur)
- Subject: Re: checking for ShutDown under syste 6.
- Sender: news@gallant.apple.com
- Message-ID: <absurd-201292183350@seuss.apple.com>
- Date: Mon, 21 Dec 1992 02:36:03 GMT
- Distribution: usa
- References: <1992Dec19.233443.11739@mcs.drexel.edu> <1992Dec20.023518.12471@mcs.drexel.edu>
- Organization: MacDTS Marauders
- Followup-To: comp.sys.mac.programmer
- Lines: 35
-
- In article <1992Dec20.023518.12471@mcs.drexel.edu>, udmorrow@mcs.drexel.edu
- (Daniel Morrow) wrote:
- >
- > In article <1992Dec19.233443.11739@mcs.drexel.edu> udmorrow@mcs.drexel.edu (Daniel Morrow) writes:
- > >Under system 6, it seems that when the computer shuts down, the system just
- > >looks for the File menu, and then the Quit item and posts the proper event
- > >to trigger this. (I really don't know how it works).
- > >
- > Yes, I'm answering my own post before I get any responses on it.
- >
- > Sorry that I wasted some people's time with this question, but I found
- > the answer already, by adding two lines of code to my program,
- > ShutDwnInstall (which takes a procPtr to execute upon shutdown)
- > ShutDwnRemove (called right before ExitToShell for whatever reason)
- >
- > These work quite nicely. (also work under sys 7)
- >
- > Again, sorry to waste the bandwidth on this one.
- >
- > -Dan.
-
- Boy, I knew I should have answered that first one. While your solution
- works, it's not the best (or canonical) solution. For applications whose
- menus didn't fit the standard File/Quit naming procedure, MultiFinder
- will look in a 'mstr' or 'mst#' resource to find the name of the menu
- and menu item to fake to cause the application to quit. In this way,
- you can tell MultiFinder where to find your File/Quit equivalent. The
- documentation on this is in Tech Note #205, "MultiFInder Revisited:
- The 6.0 System Release".
-
- I think you'll find this to be the best way to get your application to
- quit correctly in System 6.0.x.
-
- Tim Dierks
- MacDTS, pinball addict
-