Instance Method

selectionShouldChangeInTableView:

Asks the delegate if the user is allowed to change the selection.

Declaration

- (BOOL)selectionShouldChangeInTableView:(NSTableView *)tableView;

Parameters

aTableView

The table view that sent the message.

Return Value

YES to allow the table view to change its selection (typically a row being edited), NO to deny selection change.

Discussion

The user can select and edit different cells within the same row, but can’t select another row unless the delegate approves. The delegate can implement this method for complex validation of edited rows based on the values of any of their cells.

See Also

Selecting Rows

- tableView:shouldSelectRow:

Asks the delegate if the table view should allow selection of the specified row.

- tableView:selectionIndexesForProposedSelection:

Asks the delegate to accept or reject the proposed selection.

- tableView:shouldSelectTableColumn:

Asks the delegate whether the specified table column can be selected.

- tableViewSelectionIsChanging:

Tells the delegate that the table view’s selection is in the process of changing.

- tableViewSelectionDidChange:

Tells the delegate that the table view’s selection has changed.

- tableView:shouldTypeSelectForEvent:withCurrentSearchString:

Asks the delegate to allow or deny type select for the specified event and current search string.

- tableView:typeSelectStringForTableColumn:row:

Asks the delegate to provide an alternative text value used for type selection for the specified row and column.

- tableView:nextTypeSelectMatchFromRow:toRow:forString:

Asks the delegate for the row within the specified search range that matches the specified string.