home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #19 / NN_1992_19.iso / spool / comp / sys / mac / programm / 14773 < prev    next >
Encoding:
Internet Message Format  |  1992-08-31  |  1.8 KB

  1. Path: sparky!uunet!cs.utexas.edu!sdd.hp.com!uakari.primate.wisc.edu!ames!sun-barr!sh.wide!wnoc-tyo-news!ccut!wsclark!omphalos!tague@omphalos.bug.co.jp
  2. From: tague@omphalos.bug.co.jp (Tague Griffith )
  3. Newsgroups: comp.sys.mac.programmer
  4. Subject: Re: Open file at launch time?
  5. Message-ID: <5575@omphalos.bug.co.jp>
  6. Date: 31 Aug 92 11:33:32 GMT
  7. References: <1992Aug31.070551.16993@midway.uchicago.edu>
  8. Sender: news@omphalos.bug.co.jp
  9. Organization: BUG, Inc.   Sapporo, Japan
  10. Lines: 22
  11.  
  12. Subject says it all.
  13.  
  14. Under system 7.0, when your application is opened, the finder first sends the
  15. application an kAEOpenApplication ('oapp')  apple event.  Your application 
  16. should respond by doing anything it needs to do at startup.  Then the finder
  17. sends your application an kAEOpenDocuments 'odoc' event which includes a list
  18. of alias records to the double clicked files, resolve the aliases and then
  19. open the files.  Pretty much the same thing with the print document event as
  20. well.
  21.  
  22. Under system 6.0.x you can use the CountAppFiles, GetAppFiles, and ClrAppFiles
  23. procedures to handle this.  Your application really should support both 
  24. methods, since system 6.0.x is still the latest version of the os in many
  25. languages.  The Apple Event stuff is documented in IM VI (including example
  26. code) and the *AppFiles routines in IM II.  Plus, I think the 
  27. comp.sys.mac.programmer faq.----------------------------------------------------------------------------
  28. internet : tague@bug.co.jp         |  $@%S!<!&%f!<!&%8!<;%KZF|K\$G$9(J
  29.          : tague@cs.stanford.edu   |  $@%9%?%s%U%)%I!<Bg3X%"%a%j%+$G$9(J
  30. AppleLink: BUGPLAN.DVJ             |  BUG, Sapporo Japan (ISDN Development)
  31. "A result is a neutralisation ov, and challenge to, thee centre ov Control.
  32. A Tribal State replacing a State ov tribe." - G.P-Orridge, Psychic TV
  33. ----------------------------------------------------------------------------
  34.