home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #18 / NN_1992_18.iso / spool / comp / sys / mac / programm / 14335 < prev    next >
Encoding:
Internet Message Format  |  1992-08-21  |  2.2 KB

  1. Path: sparky!uunet!cis.ohio-state.edu!zaphod.mps.ohio-state.edu!usc!cs.utexas.edu!natinst.com!bigtex!texsun!digi!jjacobso
  2. From: jjacobso@digi.lonestar.org (Jon Jacobson)
  3. Newsgroups: comp.sys.mac.programmer
  4. Subject: ThinkC project resource problems
  5. Message-ID: <1992Aug21.145255.8244@digi.lonestar.org>
  6. Date: 21 Aug 92 14:52:55 GMT
  7. Sender: jjacobso@digi.lonestar.org (Jon Jacobson)
  8. Organization: DSC Communications, Plano Tx.
  9. Lines: 33
  10.  
  11. Fellow netters,
  12.  
  13. I've been working on the ColorTutor project in Dave Mark's book 'Primer Volume 2' and
  14. have been having problems with the program recognizing its resource file.  I'm running
  15. a tuned-up System 7 with ThinkC 5.02 on an LC II.  The problem I'm seeing is that when
  16. the program is run the GetMenu() calls to load the menu handles for the popup menus 
  17. return a zero handle.  I created the resources using ResEdit 2.1.1 and have even recreated
  18. the resource file several times just to be sure it wasn't a typo or something.  Yes, the
  19. menu ID stuff is correct, ResEdit 2.1.1 is smart enough to do that for me :^).
  20.  
  21. As an experiment I modified the call to IsColor() to !IsColor() so that the Alert would
  22. always be displayed upon executing the program.  What I found was that if I didn't include
  23. the MENU resources in the project resource file the alert would display correctly.  If the
  24. MENU resources were included in the project resource file the alert was not displayed.
  25.  
  26. To make matters worse after I'd been working on this for a while whenever I tried to execute
  27. the program I'd get the old "finder" Unimplemented Trap bomb.  To be safe I reloaded ThinkC
  28. from my originals.  Has anyone seen this kind of strangeness before or have a clue as to
  29. why I'm seeing such strange resource problems?
  30.  
  31. I have been through the source code several times and I'm confident that everything is
  32. typed properly.  The program "behaves" as long as you don't try the popup menus (of course
  33. it doesn't like 0x00000000 for menu handles). 
  34.  
  35. Thanks in advance for your help!
  36.  
  37. Jon Jacobson   INTERNET: jjacobso@digi.lonestar.org
  38.  
  39. -- 
  40. Jon Jacobson               | 
  41. jjacobso@digi.lonestar.org | Tis better to program and never be published
  42. DSC Communications         |   than to have never programmed at all.
  43. Plano, Texas               |                      -me (apologies to W.S.)
  44.