Hey experts,
When I drag rows from an NSTableView to another NSOutlineView, the NSOutlineView gets a yellow highlighting border. How do I avoid that?
To be precise, this happens only if I drag the rows from the table into the free space (i.e. not on any items) of the NSTableView. However, when I drag the rows directly on items in the NSOutlineView, the yellow border does not show up, but (of course) the items get selected themselves.
The important part of outlineView:validateDrop:proposedItem:proposedChildIndex:
in NSOutlineViews' data source looks like this:
- (NSDragOperation)outlineView:(NSOutlineView *)outlineView
validateDrop:(id <NSDraggingInfo>)info
proposedItem:(id)item
proposedChildIndex:(NSInteger)index
{
if ([info draggingSource] == myOtherTableView) {
[outlineView setDropItem:item
dropChildIndex:NSOutlineViewDropOnItemIndex];
return NSDragOperationMove;
}
return NSDragOperationNone;
}
Thanks for any help!