home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1993 #1 / NN_1993_1.iso / spool / comp / sys / mac / programm / 20876 < prev    next >
Encoding:
Text File  |  1993-01-07  |  2.4 KB  |  49 lines

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