home *** CD-ROM | disk | FTP | other *** search
- 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
- From: tague@omphalos.bug.co.jp (Tague Griffith )
- Newsgroups: comp.sys.mac.programmer
- Subject: Re: Open file at launch time?
- Message-ID: <5575@omphalos.bug.co.jp>
- Date: 31 Aug 92 11:33:32 GMT
- References: <1992Aug31.070551.16993@midway.uchicago.edu>
- Sender: news@omphalos.bug.co.jp
- Organization: BUG, Inc. Sapporo, Japan
- Lines: 22
-
- Subject says it all.
-
- Under system 7.0, when your application is opened, the finder first sends the
- application an kAEOpenApplication ('oapp') apple event. Your application
- should respond by doing anything it needs to do at startup. Then the finder
- sends your application an kAEOpenDocuments 'odoc' event which includes a list
- of alias records to the double clicked files, resolve the aliases and then
- open the files. Pretty much the same thing with the print document event as
- well.
-
- Under system 6.0.x you can use the CountAppFiles, GetAppFiles, and ClrAppFiles
- procedures to handle this. Your application really should support both
- methods, since system 6.0.x is still the latest version of the os in many
- languages. The Apple Event stuff is documented in IM VI (including example
- code) and the *AppFiles routines in IM II. Plus, I think the
- comp.sys.mac.programmer faq.----------------------------------------------------------------------------
- internet : tague@bug.co.jp | $@%S!<!&%f!<!&%8!<;%KZF|K\$G$9(J
- : tague@cs.stanford.edu | $@%9%?%s%U%)%I!<Bg3X%"%a%j%+$G$9(J
- AppleLink: BUGPLAN.DVJ | BUG, Sapporo Japan (ISDN Development)
- "A result is a neutralisation ov, and challenge to, thee centre ov Control.
- A Tribal State replacing a State ov tribe." - G.P-Orridge, Psychic TV
- ----------------------------------------------------------------------------
-