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 (Cocoa-dev@lists.apple.com)

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 arch...@mail-archive.com

Reply via email to