home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #30 / NN_1992_30.iso / spool / comp / sys / mac / programm / 20128 < prev    next >
Encoding:
Text File  |  1992-12-21  |  2.1 KB  |  49 lines

  1. Newsgroups: comp.sys.mac.programmer
  2. 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
  3. From: absurd@apple.apple.com (Tim Dierks, software saboteur)
  4. Subject: Re: checking for ShutDown under syste 6.
  5. Sender: news@gallant.apple.com
  6. Message-ID: <absurd-201292183350@seuss.apple.com>
  7. Date: Mon, 21 Dec 1992 02:36:03 GMT
  8. Distribution: usa
  9. References: <1992Dec19.233443.11739@mcs.drexel.edu> <1992Dec20.023518.12471@mcs.drexel.edu>
  10. Organization: MacDTS Marauders
  11. Followup-To: comp.sys.mac.programmer
  12. Lines: 35
  13.  
  14. In article <1992Dec20.023518.12471@mcs.drexel.edu>, udmorrow@mcs.drexel.edu
  15. (Daniel Morrow) wrote:
  16. > In article <1992Dec19.233443.11739@mcs.drexel.edu> udmorrow@mcs.drexel.edu (Daniel Morrow) writes:
  17. > >Under system 6, it seems that when the computer shuts down, the system just
  18. > >looks for the File menu, and then the Quit item and posts the proper event
  19. > >to trigger this. (I really don't know how it works).
  20. > >
  21. > Yes, I'm answering my own post before I get any responses on it.
  22. > Sorry that I wasted some people's time with this question, but I found
  23. > the answer already, by adding two lines of code to my program, 
  24. >     ShutDwnInstall (which takes a procPtr to execute upon shutdown)
  25. >     ShutDwnRemove (called right before ExitToShell for whatever reason)
  26. > These work quite nicely. (also work under sys 7)
  27. > Again, sorry to waste the bandwidth on this one.
  28. > -Dan.
  29.  
  30. Boy, I knew I should have answered that first one.  While your solution
  31. works, it's not the best (or canonical) solution.  For applications whose
  32. menus didn't fit the standard File/Quit naming procedure, MultiFinder 
  33. will look in a 'mstr' or 'mst#' resource to find the name of the menu
  34. and menu item to fake to cause the application to quit.  In this way,
  35. you can tell MultiFinder where to find your File/Quit equivalent.  The
  36. documentation on this is in Tech Note #205, "MultiFInder Revisited:
  37. The 6.0 System Release".
  38.  
  39. I think you'll find this to be the best way to get your application to
  40. quit correctly in System 6.0.x.
  41.  
  42. Tim Dierks
  43. MacDTS, pinball addict
  44.