Instance Method

tableView:validateDrop:proposedRow:proposedDropOperation:

Used by aTableView to determine a valid drop target.

Declaration

- (NSDragOperation)tableView:(NSTableView *)tableView validateDrop:(id<NSDraggingInfo>)info proposedRow:(NSInteger)row proposedDropOperation:(NSTableViewDropOperation)dropOperation;

Parameters

aTableView

The table view that sent the message.

info

An object that contains more information about this dragging operation.

row

The index of the proposed target row.

operation

The type of dragging operation proposed.

Return Value

The dragging operation the data source will perform.

Discussion

The data source may retarget a drop by calling setDropRow:dropOperation: and returning something other than NSDragOperationNone. A data source might retarget for various reasons, such as to provide better visual feedback when inserting into a sorted position.

To propose a drop on the second row, row would be 2 and operation would be NSTableViewDropOn. To propose a drop below the last row, row would be [aTableView numberOfRows] and operation would be NSTableViewDropAbove.

See Also

Drag and Drop

- tableView:acceptDrop:row:dropOperation:

Called by aTableView when the mouse button is released over a table view that previously decided to allow a drop.

- tableView:namesOfPromisedFilesDroppedAtDestination:forDraggedRowsWithIndexes:

Returns an array of filenames that represent the indexSet rows for a drag to dropDestination.

Deprecated
- tableView:writeRowsWithIndexes:toPasteboard:

Returns a Boolean value that indicates whether a drag operation is allowed.

Deprecated
- tableView:draggingSession:willBeginAtPoint:forRowIndexes:

Implement this method to determine when a dragging session will begin.

- tableView:updateDraggingItemsForDrag:

Implement this method to allow the table to update dragging items as they are dragged over a view.

- tableView:draggingSession:endedAtPoint:operation:

Implement this method to determine when a dragging session has ended.