#import extern NSString *CogDNDIndexType; extern NSString *CogUrlsPboardType; extern NSString *iTunesDropType; @interface DNDArrayController : NSArrayController @property IBOutlet NSTableView *tableView; // table view drag and drop support - (id )tableView:(NSTableView *)tableView pasteboardWriterForRow:(NSInteger)row; - (void)tableView:(NSTableView *)tableView draggingSession:(NSDraggingSession *)session willBeginAtPoint:(NSPoint)screenPoint forRowIndexes:(NSIndexSet *)rowIndexes; - (NSDragOperation)tableView:(NSTableView *)tableView validateDrop:(id )info proposedRow:(NSInteger)row proposedDropOperation:(NSTableViewDropOperation)dropOperation; - (BOOL)tableView:(NSTableView *)tableView acceptDrop:(id )info row:(NSInteger)row dropOperation:(NSTableViewDropOperation)dropOperation; // utility methods -(void)moveObjectsInArrangedObjectsFromIndexes:(NSIndexSet *)indexSet toIndex:(NSUInteger)insertIndex; // This is needed to undo the above - (void)moveObjectsFromIndex:(NSUInteger)fromIndex toArrangedObjectIndexes:(NSIndexSet *)indexSet; @end