• 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: Getting 'mouseMoved' events
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Getting 'mouseMoved' events


  • Subject: Re: Getting 'mouseMoved' events
  • From: Matthew <email@hidden>
  • Date: Tue, 21 May 2002 20:02:32 -0400

Jim -

Make sure that your view is the first responder. Test to make sure that the window is getting the setAcceptsMouseMovedEvents message ok. It seems like you shouldnt have to be the first responder to get mouse moved events - I could see where you might want to track them in views that arent the fr - but thats the way it is.

(from within your NSView's awakeFromNib method - if you are using nibs)
- (void)awakeFromNib
{
[[self window] makeFirstResponder: self];
[[self window] setAcceptsMouseMovedEvents: YES];
if ([[self window] acceptsMouseMovedEvents]) {NSLog(@"window now acceptsMouseMovedEvents");}
}

hope this works for you,
cheers,
M@



On Monday, May 20, 2002, at 07:03 PM, James Pengra wrote:

I have an NSView in which I utilize mouseDown events and would also like to track the mouse cursor using mouseMoved events. I send the message [myWindow setAcceptsMouseMovedEvents:YES]; before looking for mouse movement, but the procedure -(void)mouseMoved:(NSEvent *)event never gets called. However, mouseDown gets called every time I click in the View.
What else must I do to to activate mouseMoved events?

Thanks, Jim
_______________________________________________
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.
_______________________________________________
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: Getting 'mouseMoved' events
      • From: James Pengra <email@hidden>
References: 
 >Getting 'mouseMoved' events (From: James Pengra <email@hidden>)

  • Prev by Date: Re: Flame retardant
  • Next by Date: Re: Sending mail from Cocoa Apps
  • Previous by thread: Re: Getting 'mouseMoved' events
  • Next by thread: Re: Getting 'mouseMoved' events
  • Index(es):
    • Date
    • Thread