Question

I am learning drag and drop in cocoa... I am unable to drag row from NSOutlineView to drop in NSTableView its to difficult for me.. I have tried the following methods..

- (BOOL)outlineView:(NSOutlineView *)outlineView writeItems:(NSArray *)items toPasteboard:(NSPasteboard *)pasteboard proposedChildIndex:(NSInteger)index
- (NSDragOperation)outlineView:(NSOutlineView *)outlineView validateDrop:(id <NSDraggingInfo>)info proposedItem:(id)item proposedChildIndex:(NSInteger)index
- (BOOL)outlineView:(NSOutlineView *)outlineView acceptDrop:(id <NSDraggingInfo>)info item:(id)item childIndex:(NSInteger)index

but i can't perform darg and drop.

Was it helpful?

Solution

You will also have to call registerForDraggedTypes: on the destination table view in order to register which drop types the tableview will accept.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top