views:

92

answers:

1

Hi,

I have an NSTableView and I have successfully implemented both tableView:validateDrop:proposedRow:proposedDropOperation: and tableView:acceptDrop:row:dropOperation:.

I don't need tableView:writeRowsWithIndexes:toPasteboard: because that's for dragging objects out of the NSTableView.

Now, the problem is that I want it to behave kind of iTunes-like. In iTunes 9.x (I don't remember it for the previous versions) you have an NSTableView (the playlist) and when you drag a file over it you get this blue focus inside the NSTableView (maybe it's the NSScrollView?) and you don't have the blue horizontal line that indicates where you're going to insert an object. So basically I would like:

  • No blue horizontal insert line between rows when hovering a file over the NSTableView.

  • The blue focus inside the NSTableView (or NSScrollView).

Any help would be greatly appreciated so thank you in advance.

+3  A: 

From the Mac Dev Center

- (void)setDropRow:(NSInteger)row dropOperation:(NSTableViewDropOperation)operation

....

"Passing a value of –1 for row, and NSTableViewDropOn as the operation causes the entire table view to be highlighted rather than a specific row. This is useful if the data displayed by the receiver does not allow the user to drop items at a specific row location"

Erik Elmgren
Thank you. Sorry for overseeing an important part of Apple's documentation.