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

  1. Path: sparky!uunet!cs.utexas.edu!usc!rpi!bu.edu!transfer!ceylon!choffman.gte.com!user
  2. From: chuck@gte.com (Chuck Hoffman)
  3. Newsgroups: comp.sys.mac.programmer
  4. Subject: Re: DrawGrowIcon...somethings wrong
  5. Message-ID: <chuck-090992090327@choffman.gte.com>
  6. Date: 9 Sep 92 13:46:18 GMT
  7. References: <1992Sep4.144520.7678@utkux1.utk.edu>
  8. Sender: news@ceylon.gte.com
  9. Followup-To: comp.sys.mac.programmer
  10. Organization: GTE Laboratories
  11. Lines: 40
  12.  
  13. In article <1992Sep4.144520.7678@utkux1.utk.edu>, danny@utkux1.utk.edu
  14. (Danny W. McCampbell) wrote:
  15. > activateEvt: 
  16. >     begin
  17. >      TempLongInt := BitAnd(theEvent.modifiers, $000F);
  18. >      if TempLongInt = 1 then
  19. >       begin
  20. >        HiliteControl(gScrollBarHandle, 0);
  21. >        DrawGrowIcon(window);
  22. >       end
  23. >      else
  24. >       begin
  25. >        HiliteControl(gScrollBarHandle, 255);
  26. >        DrawGrowIcon(window);
  27. >       end;
  28. >     end;
  29. > It's me again.  When I use this code to try to hide the DrawGrowIcon
  30. > box and show it I get a Bus Error.  From what I understand from
  31. > IM Vol I that when I call DrawGrowIcon when the window is inactive it
  32. > will draw just the outline and actually hide the grow box.  Why
  33. > do I get a bus error here?
  34.  
  35. The code looks correct to me, so I would ask myself:
  36. o  Is 'window' a valid pointer when this code runs?
  37. o  Is the grafPort set to the 'window' when this code runs?
  38. o  If you are using THINK Pascal, do you have the resource file / fork open
  39. from some previous debugging work?  (I don't know THINK Pascal, but with
  40. THINK C this can cause spectacular effects.)
  41.  
  42. Chuck Hoffman
  43. chuck@gte.com
  44. GTE Laboratories, Waltham, Massachusetts, USA
  45. (617) 466-2131
  46. =====================================
  47. I'm not sure why we're here, but I am sure that while we're here we're
  48. supposed to help each other.
  49. =====================================
  50.