• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
The correct use of addCursorRect
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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.

  • Follow-Ups:
    • Re: The correct use of addCursorRect
      • From: "Ben Kennedy" <email@hidden>
  • Prev by Date: Locking multiple views at the same time in a single window?
  • Next by Date: Re: The correct use of addCursorRect
  • Previous by thread: Locking multiple views at the same time in a single window?
  • Next by thread: Re: The correct use of addCursorRect
  • Index(es):
    • Date
    • Thread