Path: utzoo!attcan!uunet!cs.utexas.edu!tut.cis.ohio-state.edu!ucbvax!ucdavis!iris!lim From: lim@iris.ucdavis.edu (Lloyd Lim) Newsgroups: comp.sys.mac.programmer Subject: Re: Death of jGNEFilter? Message-ID: <6020@ucdavis.ucdavis.edu> Date: 24 Nov 89 09:33:18 GMT References: <2323@hudson.acc.virginia.edu> <9068@hoptoad.uucp> Sender: uucp@ucdavis.ucdavis.edu Reply-To: lim@iris.ucdavis.edu (Lloyd Lim) Organization: U.C. Davis - Department of Electrical Engineering and Computer Science Lines: 40 In article <9068@hoptoad.uucp> tim@hoptoad.UUCP (Tim Maroney) writes: >In article <2323@hudson.acc.virginia.edu> cak3g@astsun8.astro.Virginia.EDU >(Colin Klipsch) writes: >>[...] >>If I wish to remain compatible with future Macs (as I do in fact), how >>does one respond to events without using jGNEFilter? Will there be some >>new method? Is there a more subtle way of responding to events of >>which I am not aware? > >Sure, just tail patch GetNextEvent! Seriously, the answer to your >question is that there is no way to do this kind of thing and be >compatible with the guidelines. You can either tail patch, which may >break now or soon, or use jGNEfilter, which may break in 1991. I'd go >for the latter, that is, keep doing what you're doing now. The best suggestion I can make is that you can head patch PostEvent and PPostEvent if your patch doesn't move memory. If you're doing something else that doesn't move memory this might work for you. But you want to play sounds... (BTW, TappyType doesn't play on my IIcx unless I disabled all my INITs. Since it's not life or death, I didn't bother to find out which one it was and I just don't use it.) How about setting a flag in your PostEvent head patches and checking for it in a head patch to GetNextEvent and company? Depending on the flag, you can play your sound(s) before GetNextEvent gets called. It shouldn't matter what event mask the call has since you just want to play sounds whenever a key was previously hit. I haven't fully thought this through but it sounds ok to me. Anyone think of any problems with this? (Hey, if this works, we can start a consulting business here! First we (the collective body of comp.sys.mac.programmers) figure how to make the trash can flush, then we figure out how to make the keyboard into a typewriter! Give us a tail patch and we'll try to come up with some insanely complex clean way to do it! :-) Now watch someone give a reason why my method won't work.) +++ Lloyd Lim Internet: lim@iris.ucdavis.edu (128.120.57.20) Compuserve: 72647,660 US Mail: 146 Lysle Leach Hall, U.C. Davis, Davis, CA 95616