home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #20 / NN_1992_20.iso / spool / comp / sys / mac / programm / 15373 < prev    next >
Encoding:
Internet Message Format  |  1992-09-11  |  1.9 KB

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