On 24 May 2008, at 6:36 am, Davide Scheriani wrote:

[pboard declareTypes:[NSArray arrayWithObject:NSGeneralPboard] owner:self];



Wow. That's possibly one of the weirdest bits of code I've seen for a while :)

Do read this:

http://developer.apple.com/documentation/Cocoa/Conceptual/CopyandPaste/index.html

and this:

http://developer.apple.com/documentation/Cocoa/Conceptual/DragandDrop/index.html

The above should be something like:

NSPasteboard* pb = [NSPasteboard generalPastebord];

[pb declareTypes:[self myListOfPasteboardTypes] owner:self];



But actually for drag and drop of rows in a table view, or dragging data into or from a table view, you don't use the general pasteboard anyway, but the dragging pasteboard. To do this you need to register your table view to receive the dragging types you want, then implement the NSDraggingDestination (and to drag from, the NSDraggingSource) protocol. The docs linked above should tell you what you need to know. Throw away the code you posted, it's too far gone.

hth,

G.
_______________________________________________

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