Path: utzoo!utgpu!water!watmath!clyde!att!osu-cis!tut.cis.ohio-state.edu!bloom-beacon!gatech!rutgers!bellcore!decvax!spray!anson From: anson@spray.CalComp.COM (Ed Anson) Newsgroups: comp.sys.mac.programmer Subject: Re: Multifinder: how do I patch GetNextEvent? Message-ID: <2456@spray.CalComp.COM> Date: 12 Oct 88 15:26:55 GMT References: <747@ttrdf.UUCP> <10050025@eecs.nwu.edu> Reply-To: anson@spray.UUCP (Ed Anson) Organization: CalComp, A Lockheed Company, Hudson, NH, USA Lines: 50 In article <10050025@eecs.nwu.edu> bob@eecs.nwu.edu (Bob Hablutzel) writes: >>What I'm still trying to figure out is this: Why does Apple persist in >>forbidding a very useful type of patch? > >The reason is that [very lucid explanation not repeated here.] Thank you, Bob. Now I understand. But I still don't like it :-( There are some traps (like GetNextEvent) which are usefully patched at the end. There are lots of people (like me) who want to accomplish something that can only be accomplished by tail patching this trap. So our application works today, but may someday cause strange failures in other areas. I hope that it's unlikely for GetNextEvent to cause such a problem, because if it does then my only solution to another problem goes away. As I understand it (now), the only traps which must not be tail patched are those which: 1. Are relatively small, and 2. Are called from other (bigger) traps. Is it thus possible for Apple to classify traps according to these criteria, and to declare some traps as safe for tail patching? I would hope that GetNextEvent could be declared safe. Anyone from Apple want to comment on this issue? I guess it's unavoidable, but it's still annoying that subtle new rules keep popping up, documented in obscure places: 1. Avoid tail patches. 2. Call GetNextEvent three or four times before opening a window. 3. Don't use the application events for application events. These (and possibly other) new rules have broken, or threaten to break, useful things for me. In some cases, those things were already written according to the rules in effect at the time. I know that most of these changes were necessary in some way to make new things work, and I'm willing to live with that. But I would appreciate it if the impact of some changes could be reduced. I would rather see the rules modified to something like: 1. Avoid tail patches, except for the following traps... 2. (why is this necessary? sounds like a MultiFinder bug to me!) 3. Reserve one application event to applications, and guarantee that posting it will return it to the posting application. I like to dream. :-) -- ===================================================================== Ed Anson, Calcomp Display Products Division, Hudson NH 03051 (603) 885-8712, anson@elrond.CalComp.COM