Re: -mouseDragged: sent to view when dragging window
Re: -mouseDragged: sent to view when dragging window
- Subject: Re: -mouseDragged: sent to view when dragging window
- From: Quincey Morris <email@hidden>
- Date: Tue, 24 Jul 2012 14:29:57 -0700
On Jul 24, 2012, at 13:36 , Markus Spoettl wrote:
> My view reacts to -mouseDragged: but doesn't check if there's been a -mouseDown: first because that's implicit. Did that change?
The Cocoa Event Handling Guide says "Mouse events are dispatched by an NSWindow object to the NSView object over which the event occurred", so I guess there's a lag/race condition that's putting your view under the mouse pointer at the moment the event is generated.
I think it's implicit that a mouseDown has occurred before a mouseDragged, but I don't see anything that guarantees they're sent to the same view. In that case, you should really set a state flag in mouseDown that's checked in mouseDragged.
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please 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