Protocol

NSControlTextEditingDelegate

A set of optional methods implemented by delegates of NSControl subclasses to respond to editing actions.

Declaration

@protocol NSControlTextEditingDelegate

Topics

Validating a Control’s Value

- control:isValidObject:

Invoked when the insertion point leaves a cell belonging to the specified control, but before the value of the cell’s object is displayed.

- control:didFailToValidatePartialString:errorDescription:

Invoked when the formatter for the cell belonging to control (or selected cell) rejects a partial string a user is typing into the cell.

Responding to Text Formatting

- control:didFailToFormatString:errorDescription:

Invoked when the formatter for the cell belonging to the specified control cannot convert a string to an underlying object.

Responding to Text Editing

- control:textShouldBeginEditing:

Invoked when the user tries to enter a character in a cell of a control that allows editing of text (such as a text field or form field).

- control:textShouldEndEditing:

Invoked when the insertion point tries to leave a cell of the control that has been edited.

Working with Text Completion

- control:textView:completions:forPartialWordRange:indexOfSelectedItem:

Invoked to allow you to control the list of proposed text completions generated by text fields and other controls.

Working with Key Bindings

- control:textView:doCommandBySelector:

Invoked when users press keys with predefined bindings in a cell of the specified control.

See Also

Management

NSTextFieldDelegate

A protocol that a text field delegate can use to control its field editor action menu.