home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #20 / NN_1992_20.iso / spool / comp / sys / mac / programm / 15209 < prev    next >
Encoding:
Internet Message Format  |  1992-09-08  |  2.0 KB

  1. Path: sparky!uunet!haven.umd.edu!darwin.sura.net!wupost!waikato.ac.nz!ldo
  2. From: ldo@waikato.ac.nz (Lawrence D'Oliveiro, Waikato University)
  3. Newsgroups: comp.sys.mac.programmer
  4. Subject: Re: Patching the _Launch Trap
  5. Message-ID: <1992Sep9.184936.10712@waikato.ac.nz>
  6. Date: 9 Sep 92 18:49:36 +1200
  7. References: <1992Sep8.024049.20121@Arco.COM> <1992Sep8.145100.26889@Arco.COM> <gvrn-n#.leonardr@netcom.com>
  8. Organization: University of Waikato, Hamilton, New Zealand
  9. Lines: 27
  10.  
  11. In article <gvrn-n#.leonardr@netcom.com>, leonardr@netcom.com (Leonard Rosenthol) writes:
  12.  
  13. >     One way that might work, assuming that you only care about System 7
  14. > would be to intercept 'osel' events in the Finder.  When the Finder "opens"
  15. > anything, file, folder, disk, etc. it will send itself an 'osel' event - also
  16. > many launching utils will also send the same event to the Finder in order to
  17. > have things opened.
  18. >
  19. >     There are two ways to intercept Apple events.  The hard way is to patch
  20. > _Pack8 (Apple Event manager), the easy (but undocumented way) is to install
  21. > something called a PHAQHandler.  A PHAQHandler is the equivalent of a head
  22. > patch on an Apple event handler, so you could just grab the data for the event
  23. > and then pass it along.  You might also be able to do the same thing by
  24. > getting the address of the current 'osel' handler, installing your own and
  25. > then calling the original...
  26.  
  27. This may work with Finder 7.1 (not that I've seen it), but it certainly won't
  28. work with Finder 7.0. Finder 7.0 doesn't use the Apple Event Manager for doing
  29. its own event handling, so it's no good trying to intercept Finder events by
  30. doing anything to or with the Apple Event Manager. Not from within the Finder's
  31. process context, anyway. You'll have to patch AcceptHighLevelEvent.
  32.  
  33. Lawrence D'Oliveiro                       fone: +64-7-856-2889
  34. Computer Services Dept                     fax: +64-7-838-4066
  35. University of Waikato            electric mail: ldo@waikato.ac.nz
  36. Hamilton, New Zealand    37^ 47' 26" S, 175^ 19' 7" E, GMT+12:00
  37. This line intentionally left unfunny.
  38.