home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #31 / NN_1992_31.iso / spool / comp / sys / mac / programm / 20483 < prev    next >
Encoding:
Text File  |  1992-12-31  |  1.7 KB  |  34 lines

  1. Newsgroups: comp.sys.mac.programmer
  2. Path: sparky!uunet!spool.mu.edu!umn.edu!csus.edu!netcom.com!bskendig
  3. From: bskendig@netcom.com (Brian Kendig)
  4. Subject: Re: How does my app know that its document was double clicked?
  5. Message-ID: <1992Dec31.205747.16147@netcom.com>
  6. Organization: Starfleet Headquarters: San Francisco
  7. References: <C04pu0.I5B@netnews.jhuapl.edu> <1992Dec31.154633.25705@alw.nih.gov>
  8. Date: Thu, 31 Dec 1992 20:57:47 GMT
  9. Lines: 23
  10.  
  11. fixer@faxcsl.dcrt.nih.gov writes:
  12. >
  13. >If your app is *not* AE-aware, you'll get some information passed along to you
  14. >at launch time.  You get at this info via the CountAppFiles() routine,
  15. >documented in the Segment Loader chapter of IM-II.  CountAppFiles() returns
  16. >information about how many documents were double-clicked, along with whether or
  17. >not you should be opening them or printing them.  Then, you use GetAppFiles()
  18. >and ClrAppFiles() as you wind through the list of double-clicked documents to
  19. >get their information and Do The Right Thing.
  20.  
  21. Now I've got a question, too.  How do you cope with double-clicking
  22. files that belong to an _open_ application?  Does this require the use
  23. of AppleEvents?  Right now, when I dragdrop a file onto my app, it
  24. launches and opens the file, but when I dragdrop another file onto my
  25. app, the Finder says "Some files could not be opened.  Try opening
  26. them from within the application."
  27.  
  28. -- 
  29. _/_/_/  Brian Kendig                             Je ne suis fait comme aucun
  30. /_/_/  bskendig@netcom.com                de ceux que j'ai vus; j'ose croire
  31. _/_/                            n'etre fait comme aucun de ceux qui existent.
  32.   /  Nolite te bastardes     Si je ne vaux pas mieux, au moins je suis autre.
  33.  /    carborundorum.                                             -- Rousseau
  34.