• 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: -mouseDragged: sent to view when dragging window
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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

  • Follow-Ups:
    • Re: -mouseDragged: sent to view when dragging window
      • From: Markus Spoettl <email@hidden>
References: 
 >-mouseDragged: sent to view when dragging window (From: Markus Spoettl <email@hidden>)

  • Prev by Date: Re: Forcing Core Data to save attribute changed behind its back?
  • Next by Date: Re: Is it 'normal' that scrolling in a UIScrollView leaks some bytes?
  • Previous by thread: -mouseDragged: sent to view when dragging window
  • Next by thread: Re: -mouseDragged: sent to view when dragging window
  • Index(es):
    • Date
    • Thread