Instance Method


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


- (void)tableView:(NSTableView *)tableView draggingSession:(NSDraggingSession *)session willBeginAtPoint:(NSPoint)screenPoint forRowIndexes:(NSIndexSet *)rowIndexes;



The table view.


The dragging session.


The initial drag location in screen coordinates.


The indexes of the rows to be dragged, excluding rows that were not dragged due to tableView:pasteboardWriterForRow: returning nil.


Implement this method to know when the dragging session is about to begin and to potentially modify the dragging session.

The dragged item order will directly match the pasteboard writer array used to begin the dragging session with the NSView method beginDraggingSessionWithItems:event:source:. Hence, the order is deterministic, and can be used in tableView:acceptDrop:row:dropOperation: when enumerating the NSDraggingInfo pasteboard classes.

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.

- tableView:validateDrop:proposedRow:proposedDropOperation:

Used by aTableView to determine a valid drop target.

- tableView:writeRowsWithIndexes:toPasteboard:

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

- 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.