Re: Cannot D&D from an NSTableView
Re: Cannot D&D from an NSTableView
- Subject: Re: Cannot D&D from an NSTableView
- From: Jens Alfke <email@hidden>
- Date: Sun, 13 Nov 2011 20:45:58 -0800
On Nov 13, 2011, at 6:12 PM, Koen van der Drift wrote:
> I am setting up D&D from an NSTableView, but I cannot drag any items. I have added registerForDraggedTypes and - (BOOL)tableView:(NSTableView *)aTableView writeRowsWithIndexes:(NSIndexSet *)rowIndexes toPasteboard:(NSPasteboard *)pboard to my table view controller, and the controller is both the datasource and delegate for the table view. The latter method does not even get called.
Huh, that sounds like it should work. (Although -registerForDraggedTypes: doesn’t affect being able to drag out, only accepting incoming drags.) You’re sure this isn’t an NSOutlineView? It has different D&D data-source methods that get called instead of the inherited ones.
Does your table have any oddball cell types in its rows? IIRC if a row’s cell tracks the mouse-down itself (as a button cell would), you can’t use that event to start a drag.
—Jens
Attachment:
smime.p7s
Description: S/MIME cryptographic signature
_______________________________________________
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