Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!zaphod.mps.ohio-state.edu!usc!apple!nerm From: nerm@Apple.COM (Dean Yu) Newsgroups: comp.sys.mac.programmer Subject: Re: jGNEFilter Message-ID: <50988@apple.Apple.COM> Date: 31 Mar 91 12:43:03 GMT References: <156750@tiger.oxy.edu> Organization: Apple Computer Inc., Cupertino, CA Lines: 22 In article <156750@tiger.oxy.edu> schorsch@oxy.edu (Brent William Schorsch) writes: >I am implementing a "tail patch" of GetNextEvent via the jGNEFilter >mechanism. While the relevant tech note discusses how to implement this, >it does not mention if or how I need to call any previously installed >filter... Currently, I am simply comparing the value I saved prior to >installing my routine in jGNEFilter to #0x00000000. If the value >differs, I jump to it via Jsr (A0) (where of course A0 is the >previous value). Most bad... jGNEFilter procs expect the event record to be in A0. Since you used A0 to call the next procedure, you're effectively passing the beginning of the next procedure to itself as the event. Now if that procedure modifies the event.... I know you put tail patch in quotes, but just for the record, _GetNextEvent calls the procedure in jGNEFilter near the beginning of the code. If you're trying to catch _GetNextEvent after it's done all it's processing, this won't work... -- Dean Yu Blue Meanie, Negative Ethnic Role Model, etc. Apple Computer, Inc. My opinions and so on and so forth...