home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!olivea!apple!goofy!mumbo.apple.com!gallant.apple.com!kip2-12.apple.com!user
- From: jpugh@apple.com (Jon Pugh)
- Newsgroups: comp.sys.mac.programmer
- Subject: Re: How does my app know that its document was double clicked?
- Message-ID: <jpugh-040193231958@kip2-12.apple.com>
- Date: 5 Jan 93 07:21:30 GMT
- References: <C04pu0.I5B@netnews.jhuapl.edu> <1992Dec31.154633.25705@alw.nih.gov> <1992Dec31.205747.16147@netcom.com> <1993Jan1.013518.2550@nwnexus.WA.COM>
- Sender: news@gallant.apple.com
- Followup-To: comp.sys.mac.programmer
- Organization: Apple Computer, Inc.
- Lines: 25
-
- In article <1993Jan1.013518.2550@nwnexus.WA.COM>, phaedrus@halcyon.com
- (Mark Phaedrus) wrote:
- >
- > Well, if you support AppleEvents then you'll get the "odoc" event. If
- > not, then the system software has to get creative. :) It sends you the
- > appropriate events as if the user chose "Open..." or "Open" from the File
- > menu. When your application calls the Standard File package to let the user
- > choose what file to open, Standard File doesn't display the Open dialog;
- > instead it just returns the data for the document the user double-clicked.
- > If you don't have an "Open" or "Open..." command on the File menu, the
- > Finder displays the "Some files could not be opened." dialog. You can get
- > around this by putting two 'mstr' resources in your application; 'mstr' 102
- > should hold the name of the menu that has your application's open-file command,
- > and 'mstr' 103 should have the name of the open-file command itself.
- > On a related note, if the user tries to shut down the Mac while your
- > application is open, and you don't support Apple events, the System will use
- > the "Quit" command on your application's File menu; you can tell it to use a
- > different command name instead by putting the menu name to use in 'mstr' 100
- > and the menu item to use in 'mstr' 101.
-
- The System is even more studly. If you send an odoc Apple Event to an
- application which doesn't support AE, it will convert the AE to these same
- "puppet strings" magically.
-
- Jon
-