home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!cs.utexas.edu!usc!rpi!bu.edu!transfer!ceylon!choffman.gte.com!user
- From: chuck@gte.com (Chuck Hoffman)
- Newsgroups: comp.sys.mac.programmer
- Subject: Re: DrawGrowIcon...somethings wrong
- Message-ID: <chuck-090992090327@choffman.gte.com>
- Date: 9 Sep 92 13:46:18 GMT
- References: <1992Sep4.144520.7678@utkux1.utk.edu>
- Sender: news@ceylon.gte.com
- Followup-To: comp.sys.mac.programmer
- Organization: GTE Laboratories
- Lines: 40
-
- In article <1992Sep4.144520.7678@utkux1.utk.edu>, danny@utkux1.utk.edu
- (Danny W. McCampbell) wrote:
- >
- > activateEvt:
- > begin
- > TempLongInt := BitAnd(theEvent.modifiers, $000F);
- > if TempLongInt = 1 then
- > begin
- > HiliteControl(gScrollBarHandle, 0);
- > DrawGrowIcon(window);
- > end
- > else
- > begin
- > HiliteControl(gScrollBarHandle, 255);
- > DrawGrowIcon(window);
- > end;
- > end;
- >
- > It's me again. When I use this code to try to hide the DrawGrowIcon
- > box and show it I get a Bus Error. From what I understand from
- > IM Vol I that when I call DrawGrowIcon when the window is inactive it
- > will draw just the outline and actually hide the grow box. Why
- > do I get a bus error here?
- >
-
- The code looks correct to me, so I would ask myself:
- o Is 'window' a valid pointer when this code runs?
- o Is the grafPort set to the 'window' when this code runs?
- o If you are using THINK Pascal, do you have the resource file / fork open
- from some previous debugging work? (I don't know THINK Pascal, but with
- THINK C this can cause spectacular effects.)
-
- Chuck Hoffman
- chuck@gte.com
- GTE Laboratories, Waltham, Massachusetts, USA
- (617) 466-2131
- =====================================
- I'm not sure why we're here, but I am sure that while we're here we're
- supposed to help each other.
- =====================================
-