home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.sys.mac.programmer
- Path: sparky!uunet!usc!rpi!psinntp!psinntp!newstand.syr.edu!greeny
- From: greeny@top.cis.syr.edu (J. S. Greenfield)
- Subject: Re: Open file at launch time?
- Message-ID: <1992Sep1.225652.21499@newstand.syr.edu>
- Organization: Syracuse University, CIS Dept.
- References: <1992Aug31.070551.16993@midway.uchicago.edu> <5575@omphalos.bug.co.jp>
- Date: Tue, 1 Sep 92 22:56:52 EDT
- Lines: 31
-
- In article <5575@omphalos.bug.co.jp> tague@omphalos.bug.co.jp (Tague Griffith ) writes:
- >
- >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.
-
- Actually, under any normal circumstances, the finder will *either* send
- an "oapp" or an "odoc" but *not* both. (That is, immediately after launching.)
-
- If you get an "oapp" it means that your application was launched *without*
- any documents--and you should take any appropriate action--for example,
- opening a new, untitled window.
-
- If you get an "odoc" it means that your application was launched *with*
- documents (those listed in the "odoc" event).
-
- If you were to get *both*, it would (normally) indicate that the application
- was first launched without any documents, and then a document was launched
- (double-clicked, or dropped on the app, for example) *after* the app was
- already running.
-
-
- --
- J. S. Greenfield greeny@top.cis.syr.edu
- (I like to put 'greeny' here,
- but my d*mn system wants a
- *real* name!) "What's the difference between an orange?"
-