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

Re: mouseMoved problems


  • Subject: Re: mouseMoved problems
  • From: John Saccente <email@hidden>
  • Date: Thu, 21 Mar 2002 14:16:53 -0600

On Thursday, March 21, 2002, at 01:57 PM, Chris Meyer wrote:

Hi Chris and John,

I'm already doing '[[self window] setAcceptsMouseMovedEvents:YES]' in 'viewDidMoveToWindow'. In fact I check to make sure it's actually doing it by printing out the value in my mouseDown method.


Yes, I didn't really read all of your code before I posted that. I think you'll find your problem to be "first-responder-related."

John

I have the following code in my class:

- (void)viewDidMoveToWindow
{
NSLog( @"accepting mouseMoved" );
NSLog( [[self window] description] );
[[self window] setAcceptsMouseMovedEvents:YES];
}

It gets executed with a non-NULL window.

But... I'll look at the MouseTracker example and see if I can figure out my problem from that.

Thanks,
Chris

On Thursday, March 21, 2002, at 11:41 AM, John Saccente wrote:

You have to "ask" to receive mouse moved messages. There's a nice little mouse event handling example at

<http://www.mmalc.com/examples/MouseTracker.gnutar.gz>

John Saccente
email@hidden

On Thursday, March 21, 2002, at 11:44 AM, Chris Purcell wrote:


Direct from the first paragraph of Apple's documentation on handling mouse events in views:

NSViews automatically receive mouse-clicked and mouse-dragged events, but because mouse-moved events occur so often and can bog down the event queue, an NSView must explicitly request its NSWindow to watch for them using NSWindow's setAcceptsMouseMovedEvents: method.

Kritter out
_______________________________________________
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: 
 >Re: mouseMoved problems (From: Chris Meyer <email@hidden>)

  • Prev by Date: Re: mouseMoved problems
  • Next by Date: Re: Need clarification on categories
  • Previous by thread: Re: mouseMoved problems
  • Next by thread: Using NSURL
  • Index(es):
    • Date
    • Thread