Instance Method


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


- (void)editWithFrame:(NSRect)rect editor:(NSText *)textObj delegate:(id)delegate event:(NSEvent *)event;



The bounding rectangle of the control’s cell.


The field editor to use.


The object to use as a delegate for the field editor. This delegate object receives various NSText delegation and notification methods during the course of editing the cell's contents.


The NSLeftMouseDown event that initiated the editing behavior.


For a receiver that is a control with editable text (such as an NSTextField object), the field editor is sized to aRect and is then activated and editing begins. It’s the responsibility of the delegate to end editing when responding to control:textShouldEndEditing:. Upon ending the editing session, the delegate should remove any data from the field editor.

See Also

Managing the Field Editor

- abortEditing

Terminates the current editing operation and discards any edited text.

- currentEditor

Returns the current field editor for the control.

- validateEditing

Validates changes to any user-typed text.

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