• 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: Bug? Not receiving mouseEntered and mouseExited events
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Bug? Not receiving mouseEntered and mouseExited events


  • Subject: Re: Bug? Not receiving mouseEntered and mouseExited events
  • From: glenn andreas <email@hidden>
  • Date: Tue, 17 Jan 2006 09:54:39 -0600


On Jan 17, 2006, at 8:58 AM, Theodore H. Smith wrote:

I have this strange situation that I am unable to receive mouseEntered or mouseExited events.



- (void)mouseEntered:(NSEvent *)theEvent {

}


- (void)mouseExited:(NSEvent *)theEvent {

}

The same button CAN receive mouseDown: event just fine.

I am enabling mouse moved events like this, in my NSWindowController subclass:


- (void)awakeFromNib { [[self window] makeFirstResponder:self]; [[self window] setAcceptsMouseMovedEvents:YES]; }

This just enables mouseMoved events (at which point your class should receive mouseMoved: messages). What you want is tracking rectangles, which are what causes mouseEntered:/mouseExited: to be called.


See <http://developer.apple.com/documentation/Cocoa/Conceptual/ BasicEventHandling/Tasks/HandlingMouseTracking.html#//apple_ref/doc/ uid/20000907> for all the details.






Glenn Andreas email@hidden <http://www.gandreas.com/> wicked fun! Widgetarium | the quickest path to widgets

_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


  • Follow-Ups:
    • Re: Bug? Not receiving mouseEntered and mouseExited events
      • From: "Theodore H. Smith" <email@hidden>
References: 
 >Bug? Not receiving mouseEntered and mouseExited events (From: "Theodore H. Smith" <email@hidden>)

  • Prev by Date: Re: "Open dialogue"-like file system browser
  • Next by Date: Re: "Open dialogue"-like file system browser
  • Previous by thread: Re: Bug? Not receiving mouseEntered and mouseExited events
  • Next by thread: Re: Bug? Not receiving mouseEntered and mouseExited events
  • Index(es):
    • Date
    • Thread