home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!stanford.edu!unix!mxmora
- From: mxmora@unix.SRI.COM (Matt Mora)
- Newsgroups: comp.sys.mac.programmer
- Subject: Re: Set/Get Cursor
- Message-ID: <38564@unix.SRI.COM>
- Date: 14 Sep 92 16:38:44 GMT
- References: <1992Sep1.202106.2865@informix.com> <1992Sep10.184138.3458@amgen.com>
- Followup-To: comp.sys.mac.programmer
- Organization: SRI International, Menlo Park, California
- Lines: 39
-
-
- In article <1992Sep10.184138.3458@amgen.com> mikeb@sam.amgen.com (Michael Brennan) writes:
- >In article <1992Sep1.202106.2865@informix.com> Bill Stackhouse, sbill@informix.com writes:
- >>Why does the following cause EvenBetterBusError detect a NIL pointer
- >>problem?
-
- >> SetCursor(*GetCursor(iBeamCursor));
-
- >Here's the code I use. It works for me:
-
- > Cursor myCursor;
- > CursHandle hCurs = 0L;
- >
- > hCurs = GetCursor( iBeamCursor );
- > myCursor = **hCurs;
-
- > SetCursor( &myCursor );
- > DisposeHandle( hCurs );
- > ShowCursor();
-
- What is different about your code than the line above? Neither has any
- error detection. Both will bomb with a nil handle. And is it really a good
- idea to dispose of a system handle or it that your own IbeamCursor resource?
-
- If your going to be changing the cursor all the time, you should just
- load and lock the cursors when your program starts up. Then you won't
- have to worry about a nil handle.
-
- Matt
-
-
-
-
-
- --
- ___________________________________________________________
- Matthew Mora | my Mac Matt_Mora@sri.com
- SRI International | my unix mxmora@unix.sri.com
- ___________________________________________________________
-