• 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
mouseMoved not coming in?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

mouseMoved not coming in?


  • Subject: mouseMoved not coming in?
  • From: "Marc Wan" <email@hidden>
  • Date: Wed, 24 Jan 2007 18:01:01 +0800

hello!

 so, i have an NSView in my application that I want to receive
mouseMoved and mouseDragged events.  After doing some research, I:

 a. made the parent NSWindow acceptsMouseMovedEvents: YES call
 b. made my NSView the first responder
 c. implemented the mouseMoved: and mouseDragged methods.

 move the mouse around in this (utility) view, and i get mouseMoved: calls.

 now, the problem is that my NSWindow holds another NSView (the main
display view), and when I drag and drop a file onto that view, I no
longer get mouseMoved: (or dragged) calls on my utility view until
somebody clicks on it with the mouse.

 I've tried making lots of calls to makeFirstResponder on the utliity
view, but it never "loses" first responder status -- the NSWindow
always thinks it's the firstResponder.

 so, any idea why it would suddenly stop receiving mouseMoved events
until there's a mouse click?

 (side question:  is there a better way to get mouseMoved events?  am
i doing things in a pretty silly way?)

 thanks.
 marc.
_______________________________________________

Cocoa-dev mailing list (email@hidden)

Do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


  • Follow-Ups:
    • Re: mouseMoved not coming in?
      • From: "John C. Randolph" <email@hidden>
    • Re: mouseMoved not coming in?
      • From: "Alan Smith" <email@hidden>
  • Prev by Date: Any way to map a native window id back to an NSWindow?
  • Next by Date: Re: Any way to map a native window id back to an NSWindow?
  • Previous by thread: Re: Any way to map a native window id back to an NSWindow?
  • Next by thread: Re: mouseMoved not coming in?
  • Index(es):
    • Date
    • Thread