The table view data source has a method for starting a drag operation. Here's a little code to start the dragging:
- (BOOL)tableView:(NSTableView *)aTableView writeRowsWithIndexes:(NSIndexSet *)rowIndexes toPasteboard:(NSPasteboard *)pboard
{
NSString *myString = ...; // code to get a string from the indexes in rowIndexes
return [pboard setString:myString forType:NSPasteboardTypeString];
}
For receiving drag operations, I think there has been enough written about it:
This is an older tutorial (2002), but I think it should still be valid. Just be sure to check the documentation about deprecated methods/names (or look at the compiler warnings): http://cocoadevcentral.com/articles/000056.php
Apples drag and drop programming guide
Or this stack overflow question with links to sample code: Cocoa multi window drag and drop example