• 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
Re: Changing an NSCursor on "Mouse-Over"
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Changing an NSCursor on "Mouse-Over"


  • Subject: Re: Changing an NSCursor on "Mouse-Over"
  • From: Iain Wood <email@hidden>
  • Date: Thu, 11 Mar 2004 10:10:58 +0000

On 11 Mar 2004, at 09:02, Michael Becker wrote:

Am 10.03.2004 um 22:52 schrieb Allan Odgaard:
On 10. Mar 2004, at 18:31, Michael Becker wrote:

So how can I achieve this "mouse is over specified coordinate, so do something" behaviour? Is there something like -mouseDown: only without the "down" :-) ?

You mean something like this:

- (void)mouseMoved:(NSEvent *)theEvent


I thought so, too, at first. But even though my windows -setAcceptsMouseMovedEvents: is set to YES and I implemented the -mouseMoved: method, it never gets called. I've read of this phenomenon in the archives, too, so it seems to be either a bug or a feature :-)

Should I go for -addCursorRect:cursor: and update the cursor-rect stack every time a resize of my selection rectangle is completed?



Do you mean addTrackingRect? If so, then yes, you need to use trackingRects with mouseMoved events, unlike mouseDown events which just get handed to your NSView subclass with no effort on your part.

Garfinkel and Mahoney "Building Cocoa Applications" chapter 18 covers this if you need a reference.

Iain
_______________________________________________
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.


References: 
 >Changing an NSCursor on "Mouse-Over" (From: Michael Becker <email@hidden>)
 >Re: Changing an NSCursor on "Mouse-Over" (From: Allan Odgaard <email@hidden>)
 >Re: Changing an NSCursor on "Mouse-Over" (From: Michael Becker <email@hidden>)

  • Prev by Date: [SOLVERD] Changing an NSCursor on "Mouse-Over"
  • Next by Date: how to import an eps file in Interface Builder
  • Previous by thread: [SOLVERD] Changing an NSCursor on "Mouse-Over"
  • Next by thread: Re: Changing an NSCursor on "Mouse-Over"
  • Index(es):
    • Date
    • Thread