Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!sun-barr!apple!stevec From: stevec@Apple.COM (Steve Christensen) Newsgroups: comp.sys.mac.programmer Subject: Re: "Startup" documents Message-ID: <49709@apple.Apple.COM> Date: 28 Feb 91 02:52:43 GMT References: <1991Feb27.111134.13347@mintaka.lcs.mit.edu> Organization: Apple Computer Inc., Cupertino, CA Lines: 36 dbert@churchy.ai.mit.edu (Douglas Siebert) writes: >[...] >What I'm trying to determine is if there is any way to use ResEdit (or some >other application) and look at [an app's] document and locate the sections >where the related application is opened. Also I'd like to know how to make >this action occur myself, but I'd bet information like that would be >available in Inside Macintosh (which I, as a new Mac owner, haven't yet >gotten around to purchasing :) ) or some other reference. Mainly though >I'd just be really happy if someone could tell me how to locate the >aforementioned sections of a startup document (not specific to any one >application, but in a general sense) Since this is probably not of general >interest it would probably be better if you e-mailed me. Thank you to >anyone who can take the time to help me out in this matter. An application's document just contains relevant data, i.e, text in a word processing document or graphics in a paint or drawing program. It has no knowledge of how to open the application. Rather, the process is the other way around: the application knows how to open and interpret the document. So how does the application get started up when you click on one (or more) of its documents? The Finder (usually) builds a list of documents that are to be opened, figures out which application they belong to (by checking the document's creator info), and opens the application(s). The application can then ask if there are any documents to be opened when it starts up and peruse that list seeing if any are for it. It then opens the documents as if "Open..." had been selected. The specifics on how this works can be found in the Segment Loader chapter of Inside Mac volume II. steve -- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Steve Christensen Never hit a man with glasses. stevec@apple.com Hit him with a baseball bat.