The correct use of addCursorRect
The correct use of addCursorRect
- Subject: The correct use of addCursorRect
- From: Matthew Smith <email@hidden>
- Date: Sun, 03 Nov 2002 12:00:09 +1100
Hello again,
I'm curious about the correct use of addCursorRect. I want to have the
cursor become a hand when it is over a certain NSView, so I am calling the
following (self being an overridden NSView):
NSCursor * arrowCursor, * handCursor;
handCursor = [NSCursor IBeamCursor];
[self addCursorRect:[self visibleRect] cursor:handCursor];
[handCursor setOnMouseEntered:YES];
Only, when my app exits, the following is printed to stdout:
_NXSetCursorRect: error getting window bounds (1001)
And the cursor doesn't change :)
Any ideas ???
Also, would I need to call the following to set the arrow cursor back?
arrowCursor = [NSCursor arrowCursor];
[self addCursorRect:[self visibleRect] cursor:arrowCursor];
[arrowCursor setOnMouseExited:YES];
Thanks,
Matt Smith
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.