Domanda

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.

È stato utile?

Soluzione

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

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top