[NSTableView] Is this a OS X 10.2 bug in NSTableView?
[NSTableView] Is this a OS X 10.2 bug in NSTableView?
- Subject: [NSTableView] Is this a OS X 10.2 bug in NSTableView?
- From: Stéphane Sudre <email@hidden>
- Date: Thu, 20 Feb 2003 12:34:20 +0100
I have a NSTableView with 9 columns.
The NSTableView data source is handling all the stuff needed to allow
drag and drop.
The bug I'm seeing is when I'm dragging a row to the last visible row.
In this case, the black line used to indicate the destination of the
drag is not erased after the drop.
I'm calling deselectAll , reloadData after the acceptDrop code so it
should be drawn correctly.
I removed any piece of code I suspected to be the culprit and yet the
bug is still there.
I added a [tv superview] setNeedsDisplay:YES]; same problem. This lets
me think that the black line is drawn outside the NSClipView.
I'm not seeing this problem on OS X 10.1. So it looks like to be a bug
introduced in 10.2.
The code I'm using looks like this:
- (NSDragOperation)tableView:(NSTableView*)tv validateDrop:(id
<NSDraggingInfo>)info proposedRow:(int)row
proposedDropOperation:(NSTableViewDropOperation)op
{
NSArray * tArray=[[info draggingPasteboard] types];
if ([tArray count]>=1 && row!=-1)
{
if (op==NSTableViewDropAbove)
{
// Some code checking
[...]
return NSDragOperationMove;
}
}
return NSDragOperationNone;
}
- (BOOL)tableView:(NSTableView*)tv acceptDrop:(id <NSDraggingInfo>)info
row:(int)row dropOperation:(NSTableViewDropOperation)op
{
// code dealing with the internal data of the data source
[...]
[tv selectRow:row byExtendingSelection:NO];
[tv reloadData];
return YES;
}
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.