NSTableView drop refuse or redirect

Christiaan Hofman <[email protected]> Mon, 17 May 2010 11:27:16 +0200
Newsgroups gmane.comp.macosx.devel
Message-ID <[email protected]>
I have a question about best practices to handle drag&drop on table views. Often I want to support only drops in certain positions. For instance, lets say I only want to support insertions (NSTableViewDropAbove) and not drop on (NSTableViewDropOn). I can do two things when I get an NSTableViewDropOn in -tableView:validateDrop:proposedRow:proposedDropOperation:. One is to simply refuse the drop (return NSDragOperationNone), the other is to redirect the drop to an NSTableViewDropAbove using setDropRow:dropOperation:. The question is what the proper way is to handle such invalid drops?

thanks,
Christiaan