• 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: Drag and drop from NSCollectionView (bug?)
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Drag and drop from NSCollectionView (bug?)


  • Subject: Re: Drag and drop from NSCollectionView (bug?)
  • From: Graham Cox <email@hidden>
  • Date: Thu, 2 Oct 2008 16:26:30 +1000


On 2 Oct 2008, at 4:02 pm, Matteo Manferdini wrote:

I subclassed them both and implemented mouseDragged: method, but if i put a breakpoint inside of both of them, I see it never gets called when I drag the mouse. Other methods (like mouseDown:) work well, so I wonder why this method isn't working.
Has anyone been able to make this work? Any clue? May be this a bug?


It's probably because NSCollectionView implements its own mouse tracking loop, which is all handled in mouseDown: It then flushes events when it finishes so that the view's -mouseDragged: and - mouseUp: methods are not called. This isn't all that unusual.

If you override -mouseDown: to NOT call super, you should find that - mouseDragged: gets called. If it does, this confirms the presence of an internal tracking loop.

It should be possible to graft on NSDraggingSource features using this information, though discriminating between the users intentions - dragging an item off versus dragging out a number of selected items in the view - might be tricky.


hth, Graham _______________________________________________

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: Drag and drop from NSCollectionView (bug?)
      • From: "Matteo Manferdini" <email@hidden>
References: 
 >Drag and drop from NSCollectionView (bug?) (From: Matteo Manferdini <email@hidden>)

  • Prev by Date: Drag and drop from NSCollectionView (bug?)
  • Next by Date: Re: iPhone NDA dropped
  • Previous by thread: Drag and drop from NSCollectionView (bug?)
  • Next by thread: Re: Drag and drop from NSCollectionView (bug?)
  • Index(es):
    • Date
    • Thread