home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1993 #1 / NN_1993_1.iso / spool / comp / sys / mac / programm / 20665 < prev    next >
Encoding:
Internet Message Format  |  1993-01-05  |  2.0 KB

  1. Path: sparky!uunet!olivea!apple!goofy!mumbo.apple.com!gallant.apple.com!kip2-12.apple.com!user
  2. From: jpugh@apple.com (Jon Pugh)
  3. Newsgroups: comp.sys.mac.programmer
  4. Subject: Re: How does my app know that its document was double clicked?
  5. Message-ID: <jpugh-040193231958@kip2-12.apple.com>
  6. Date: 5 Jan 93 07:21:30 GMT
  7. References: <C04pu0.I5B@netnews.jhuapl.edu> <1992Dec31.154633.25705@alw.nih.gov> <1992Dec31.205747.16147@netcom.com> <1993Jan1.013518.2550@nwnexus.WA.COM>
  8. Sender: news@gallant.apple.com
  9. Followup-To: comp.sys.mac.programmer
  10. Organization: Apple Computer, Inc.
  11. Lines: 25
  12.  
  13. In article <1993Jan1.013518.2550@nwnexus.WA.COM>, phaedrus@halcyon.com
  14. (Mark Phaedrus) wrote:
  15. >      Well, if you support AppleEvents then you'll get the "odoc" event.  If
  16. > not, then the system software has to get creative. :)  It sends you the 
  17. > appropriate events as if the user chose "Open..." or "Open" from the File
  18. > menu.  When your application calls the Standard File package to let the user
  19. > choose what file to open, Standard File doesn't display the Open dialog; 
  20. > instead it just returns the data for the document the user double-clicked.
  21. >      If you don't have an "Open" or "Open..." command on the File menu, the
  22. > Finder displays the "Some files could not be opened." dialog.  You can get
  23. > around this by putting two 'mstr' resources in your application; 'mstr' 102
  24. > should hold the name of the menu that has your application's open-file command,
  25. > and 'mstr' 103 should have the name of the open-file command itself.
  26. >      On a related note, if the user tries to shut down the Mac while your
  27. > application is open, and you don't support Apple events, the System will use
  28. > the "Quit" command on your application's File menu; you can tell it to use a
  29. > different command name instead by putting the menu name to use in 'mstr' 100
  30. > and the menu item to use in 'mstr' 101.
  31.  
  32. The System is even more studly.  If you send an odoc Apple Event to an
  33. application which doesn't support AE, it will convert the AE to these same
  34. "puppet strings" magically.
  35.  
  36. Jon
  37.