home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.sys.mac.programmer
- Path: sparky!uunet!mcsun!Germany.EU.net!ubrinf!news
- From: g16m@alf.zfn.uni-bremen.de (Mick Schmidt)
- Subject: Re: How does my app know that its document was double clicked?
- Message-ID: <1993Jan7.121808.5075@informatik.uni-bremen.de>
- Sender: news@informatik.uni-bremen.de (NEWS Service)
- Nntp-Posting-Host: alf.zfn.uni-bremen.de
- Organization: Universitaet Bremen
- References: <1992Dec31.154633.25705@alw.nih.gov> <1992Dec31.205747.16147@netcom.com> <1992Dec31.213234.17023@reed.edu>
- Date: Thu, 7 Jan 1993 12:18:08 GMT
- Lines: 36
-
- In article <1992Dec31.213234.17023@reed.edu> bowman@reed.edu (BoBolicious) writes:
- >In article <1992Dec31.205747.16147@netcom.com> bskendig@netcom.com (Brian Kendig) writes:
- >>Now I've got a question, too. How do you cope with double-clicking
- >>files that belong to an _open_ application? Does this require the use
- >>of AppleEvents? Right now, when I dragdrop a file onto my app, it
- >>launches and opens the file, but when I dragdrop another file onto my
- >>app, the Finder says "Some files could not be opened. Try opening
- >>them from within the application."
- >
- >Naturally, AppleEvents are the preferred way to handle this.
- >
- >If you app isn't AE-aware, MF/Sys7 attempts to fool your app by patching a
- >bunch of traps, and passes your app a mousedown event in the File menu,
- >resolves it to whicheven item in the File menu is "Open...", then patches
- >SFGetFile, return an SFReply that has the double-clicked document in the
- >record. If there's anything funky about how your app handles opening files,
- >in particular if there are different menu items to open different kinds of
- >files, this scheme will fail.
-
- Now I have a short question! ;-)
- Does this work under Sys 6 too?
- Normally it won't work to "pass" a document to a running application by
- double-clicking it in the (Multi-)Finder Window. The Finder only says
- something like the above.
-
- However there are a few applications that can be used like this, for example
- MS Word 5.0, and i always wondered how it works. I didn't find anything on
- that subject in IM I to V nor in the Spinside Mac Stack.
-
- G'Day Mick
-
- --
- Mick Schmidt / Kopenhagener Str. 145 / 2820 Bremen 77 / Tel. 0421/ 635270
- Home: ms@hb.maus.de (No Mail >40 KByte!!!) / Uni: g16m@alf.zfn.uni-bremen.de
- // Fuer Risiken und Nebenwirkungen essen Sie die Packungsbeilage
- und schlagen Sie Ihren Arzt mit dem Apotheker! //
-