Protocol

NSControlTextEditingDelegate

The NSControlTextEditingDelegate protocol defines the optional methods implemented by delegates of objects that are subclasses of NSControl.

Symbols

Validating a Control’s Value

func control(NSControl, isValidObject: Any?)

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

func control(NSControl, didFailToValidatePartialString: String, errorDescription: String?)

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

func control(NSControl, didFailToFormatString: String, errorDescription: String?)

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

Responding to Text Editing

func control(NSControl, textShouldBeginEditing: NSText)

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

func control(NSControl, textShouldEndEditing: NSText)

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

Working with Text Completion

func control(NSControl, textView: NSTextView, completions: [String], forPartialWordRange: NSRange, indexOfSelectedItem: UnsafeMutablePointer<Int>)

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

Working with Key Bindings

func control(NSControl, textView: NSTextView, doCommandBy: Selector)

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

Relationships

Inherits From