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 protected])

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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to [EMAIL PROTECTED]

Reply via email to