Instance Method

tableView:writeRowsWithIndexes:toPasteboard:

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

Declaration

- (BOOL)tableView:(NSTableView *)tableView writeRowsWithIndexes:(NSIndexSet *)rowIndexes toPasteboard:(NSPasteboard *)pboard;

Parameters

aTableView

The table view that sent the message.

rowIndexes

An index set of row numbers that will be participating in the drag.

pboard

The pasteboard to which to write the drag data.

Return Value

YES if the drag operation is allowed, NO otherwise.

Discussion

Called by aTableView after it has been determined that a drag should begin, but before the drag has been started.

To refuse the drag, return NO. To start a drag, return YES and place the drag data onto pboard (data, owner, and so on). The drag image and other drag-related information will be set up and provided by the table view once this call returns with YES.

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:validateDrop:proposedRow:proposedDropOperation:

Used by aTableView to determine a valid drop target.

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