• 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: acceptsMouseMovedEvents?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: acceptsMouseMovedEvents?


  • Subject: Re: acceptsMouseMovedEvents?
  • From: glenn andreas <email@hidden>
  • Date: Wed, 27 Apr 2005 16:26:23 -0500


On Apr 27, 2005, at 4:11 PM, Brian O'Brien wrote:


On Apr 27, 2005, at 2:44 PM, Clark Cox wrote:

On 4/27/05, Brian O'Brien <email@hidden> wrote:

On Apr 27, 2005, at 2:32 PM, Brian O'Brien wrote:

In my subclass of NSImageView I want to receive mouse move events.
I defined the method acceptsMouseMovedEvents and returned true.
I also defined the method - (void)mouseMoved:(NSEvent *)theEvent
and put an NSLog message in that function. However I get no mouse
motion events.


in my init I did [[self window] setAcceptsMouseMovedEvents:YES];

While inside you're init method, [self window[ cannot possibly be returning anything other than nil. That is, if the view's still being init'ed, it can't have been placed in a superview yet.

I got tracking rects working and I also got mouseEntered and mouseExited events...
I figured I could add [[self window] setAcceptsMouseMovedEvents:YES] in the
entered event and turn them off in the exited event... but still no mouseMoved events...



I seem to remember (but my memory could be faulty on this one) that you need to be the first responder to get the mouse moved events (this may have been to get the modifier changed flags though - it's all a bit blurry).


Glenn Andreas                      email@hidden 
 <http://www.gandreas.com/> oh my!
quadrium | build, mutate, evolve | images, textures, backgrounds, art

_______________________________________________
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: acceptsMouseMovedEvents?
      • From: "Brian O'Brien" <email@hidden>
References: 
 >acceptsMouseMovedEvents? (From: "Brian O'Brien" <email@hidden>)
 >Re: acceptsMouseMovedEvents? (From: "Brian O'Brien" <email@hidden>)
 >Re: acceptsMouseMovedEvents? (From: Clark Cox <email@hidden>)
 >Re: acceptsMouseMovedEvents? (From: "Brian O'Brien" <email@hidden>)

  • Prev by Date: Re: NSNotificationCenter
  • Next by Date: Re: [OT] WWDC hotels for car-less people?
  • Previous by thread: Re: acceptsMouseMovedEvents?
  • Next by thread: Re: acceptsMouseMovedEvents?
  • Index(es):
    • Date
    • Thread