Path: utzoo!attcan!uunet!seismo!sundc!pitstop!sun!decwrl!purdue!mailrus!ncar!tank!nucsrl!bob From: bob@eecs.nwu.edu (Bob Hablutzel) Newsgroups: comp.sys.mac.programmer Subject: Re: Multifinder: how do I patch GetNextEvent? Message-ID: <10050022@eecs.nwu.edu> Date: 9 Oct 88 02:31:50 GMT References: <747@ttrdf.UUCP> Organization: Northwestern U, Evanston IL, USA Lines: 27 > What is the proper way to patch the GetNextEvent() trap for > compatibility with MultiFinder?. I have created an INIT that > patches this call. The first thing that the patch does is call the > old GetNextEvent, (the one that was there at INIT time.). > The purpose of the patch is to translate the CapsLock modifier into > the command-key modifier. - symptoms deleted - > Any ideas? Ideas are easy. Solutions come harder. :-) The problem here is that you have written a "tail patch". This is a critter that does it's work _after_ the original ROM routine. These are verboten, since some of Apple's patches to the OS rely on the return address of the call. (I'm not kidding, and for more information why, see a recent issue BYTE which had a long article on MultiFinder. Yeah, I said BYTE.) Try this: there is a low memory global called jGNEFilterProc, or something real close to that. It is called just before _GetNextEvent returns, with A1 pointing to the event record in question. (At least, this is very close to the truth - I'm writting this from memory, without documentation). Bob Hablutzel BOB@NUACC.ACNS.NWU.EDU Disclaimer: I'd never write a practical joke INIT with this information. Nope. Not me.