home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!gatech!bloom-beacon!eru.mt.luth.se!lunic!sunic!kth.se!dront.nada.kth.se!d88-jwa
- From: d88-jwa@dront.nada.kth.se (Jon W{tte)
- Newsgroups: comp.sys.mac.programmer
- Subject: Re: Set/Get Cursor
- Message-ID: <D88-JWA.92Sep2133855@dront.nada.kth.se>
- Date: 2 Sep 92 12:38:55 GMT
- References: <1992Sep1.202106.2865@informix.com>
- Sender: usenet@kth.se (Usenet)
- Organization: Royal Institute of Technology, Stockholm, Sweden
- Lines: 37
- In-Reply-To: sbill@informix.com's message of 1 Sep 92 20:21:06 GMT
- Originator: d88-jwa@dront.nada.kth.se
- Nntp-Posting-Host: dront.nada.kth.se
-
- > sbill@informix.com (Bill Stackhouse) writes:
-
- Why does the following cause EvenBetterBusError detect a NIL pointer
- problem?
-
- SetCursor(*GetCursor(iBeamCursor));
-
-
-
- Because there's no iBeamCursor, OR you haven't locked the handle,
- OR the handle has been purged.
-
- Try:
-
- Handle h ;
- char state ;
-
- h = ( Handle ) GetCursor ( iBeamCursor ) ;
- if ( h ) {
-
- if ( ! * h ) {
-
- LoadResource ( h ) ;
- }
- state = HGetState ( h ) ;
- HLock ( h ) ;
- SetCursor ( ( Cursor * ) * h ) ;
- HSetState ( h , state ) ;
- }
-
- Only 10xx longer than your code, but it's the way you've
- gotta program these days. Don't whimp out.
-
- --
- Jon W{tte, h+@nada.kth.se, Sweden, Phone +46-8-107069
- White, Literate, Employed, Higher-Educated, Male, Straight and Not Poor.
- I must be a bad guy.
-