Instance Method

currentEditor

Returns the current field editor for the control.

Declaration

- (NSText *)currentEditor;

Return Value

The field editor for the current control, or nil if the receiver does not have a field editor.

Discussion

When the receiver is a control displaying editable text (for example, a text field) and it is the first responder, it has a field editor, which is returned by this method. The field editor is a single NSTextView object that is shared among all the controls in a window for light text-editing needs. It is automatically instantiated when needed.

See Also

Managing the Field Editor

- abortEditing

Terminates the current editing operation and discards any edited text.

- validateEditing

Validates changes to any user-typed text.

- editWithFrame:editor:delegate:event:

Begins editing of the receiver’s text using the specified field editor.

- endEditing:

Ends the editing of text in the receiver using the specified field editor.

- selectWithFrame:editor:delegate:start:length:

Selects the specified text range in the receiver's field editor.