Instance Method


Requests permission to begin editing text.


- (BOOL)textShouldBeginEditing:(NSText *)textObject;



The text object requesting permission to begin editing.

Return Value

YES if the text object should proceed to make changes. If the delegate returns NO, the text object abandons the editing operation.

The default behavior of this method is to return the value obtained from control:textShouldBeginEditing:, unless the delegate doesn’t respond to that method, in which case it returns YES, thereby allowing text editing to proceed.


This method is invoked to let the NSTextField respond to impending changes to its text. This method’s default behavior is to send control:textShouldBeginEditing: to the receiver’s delegate (passing the receiver and textObject as parameters).

See Also

Editing Text in Cells

- selectText:

Selects text in the currently selected cell or in the key cell.

- selectTextAtRow:column:

Selects the text in the cell at the specified location and returns the cell.

- textDidBeginEditing:

Invoked when there’s a change in the text after the receiver gains first responder status.

- textDidChange:

Invoked when a key-down event or paste operation occurs that changes the receiver’s contents.

- textShouldEndEditing:

Requests permission to end editing.

- textDidEndEditing:

Invoked when text editing ends.