NSTableView drop targeting error
NSTableView drop targeting error
- Subject: NSTableView drop targeting error
- From: Jesse Grosjean <email@hidden>
- Date: Tue, 6 Apr 2004 09:20:18 -0400
When dropping onto an empty table view (at the very top of the view)
I'm getting the console error:
ERROR: Attempt to set dropRow=0, dropOperation=NSTableViewDropOn when
[0 - 0] is valid range of rows.
I've even tried always returning NSDragOperationNone from the table
views validateDrop method, but that doesn't seem to work, so I'm sure
that I'm not setting the invalid drop target. I've also noticed that a
number of other cocoa apps also have this error in the same situation,
but others don't. This error message doesn't seem to cause any damage
(application keeps running), but I'd like to make sure that I'm not
doing anything wrong.
I can get rid of the error message by overriding NSTableView's
- (void)setDropRow:(int)row dropOperation:(NSTableViewDropOperation)op {
if (row == 0 && op == NSTableViewDropOn && [self numberOfRows] ==
0) return;
[super setDropRow:row dropOperation:op];
}
method.
Does anyone know what's going on here, is this a reasonable approach to
getting rid of the message?
Thanks,
Jesse
_______________________________________________
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.