home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!usc!zaphod.mps.ohio-state.edu!sample.eng.ohio-state.edu!purdue!yuma!lobo.rmhs.colorado.edu!thomask
- From: thomask@lobo.rmhs.colorado.edu (Thomas C Kerrigan)
- Newsgroups: comp.sys.mac.programmer
- Subject: Re: Problem in C, please help!
- Message-ID: <1992Sep11.235523.17700@lobo.rmhs.colorado.edu>
- Date: 11 Sep 92 23:55:23 GMT
- References: <9209112124.AA13676@yosemite.csufresno.edu>
- Organization: Rocky Mountain High School
- Lines: 26
-
- Well, I looked your code over and I think I see some problems. First off, I am
- very suprised it compiled, because I have never heard of a WNE filter (I
- assume it is Wait Next Event). Second, it seems that when you are in your
- trap, you call Wait Next Event. What happens is this: MS Word will call WNE
- and when it gets an event, your filter is run which calls WNE again, so you
- have to type the same character twice if you want your program run. Third, I
- am not sure that changing a pointer to the event message will actually change
- the message in other programs.
-
- The solution to all this is easy: download Alex Chaffe's Shift-O-Matic source
- code. Since it comes with little or no documentation, I will run you through
- it here. The actual init puts up an icon and sets one of the functions as a
- jGNE filter. When the filter function is called (filteromatic) it restores
- your global variables in A4, and gets the event message via a jGNE variable.
- If there is an event, the shiftomatic function is called, which just
- de-capitalizes the letter entered if both caps-lock and shift are being held
- down. You will want to try this code, but replace the shiftomatic function
- with one of your own.
-
- Shift-O-Matic does not compile under THINK C 5. To fix this, just put voids in
- all the functions and prototypes when you see something like function_name();
-
- I will mail you the stuff if you can't find it yourself.
-
- Live long and prosper,
- thomask@lobo.rmhs.colorado.edu
-