[comp.sys.apple] Finder-supplied data file

gwyn@smoke.BRL.MIL (Doug Gwyn) (02/12/90)

In article <1214@darkstar.ucsc.edu> lunatic@ucscb.UCSC.EDU (Lunatic) writes:
>   As applications become more "Finder aware," they will try to
>open and load the dummy file you used to launch them.

Say, how DOES an application find out the name of the double-clicked
file used to launch it?

farrier@Apple.COM (Cary Farrier) (02/13/90)

In article <12122@smoke.BRL.MIL> gwyn@brl.arpa (Doug Gwyn) writes:
>Say, how DOES an application find out the name of the double-clicked
>file used to launch it?

When an application starts up, after it has performed it's needed startup,
it should make the Tool Locator call "MessageCenter" ($1501, page 24-14 of
the IIGS Toolbox Reference Manual, Volume 2), with an action code of $0002,
getMessage, and a MessType of $0001, file info type.  If you don't get
a "messNotFoundErr" ($0111), then the content of the MessData field will
be of the folowing structure:

MessData	block	0 = open the following files
			1 = print the following files
		str	'name1'
		str	'full pathname 2'
		...
		BYTE	0

The toolbox manual says that only MessType 1 has been defined, but
others may have been defined since it's publication.  Matt or Dave,
what's the scoop?

-- 
+---------------------------------------+---------------------------------+
| Cary Farrier                          | Internet  : farrier@apple.com   |
| Apple II Systems Software Engineering	| UUCP      : apple!farrier       |
| Apple Computer, Inc.                  | Fax       : (408) 974-1704      |
| 20525 Mariani Ave.                    | AppleLink : FARRIER             |
| Cupertino, CA 95014                   |  or farrier@applelink.apple.com |
+---------------------------------------+---------------------------------+
|          I don't speak for Apple Computer, our products do.             |
+-------------------------------------------------------------------------+