Contents

textShouldBeginEditing(_:)

Requests permission to begin editing text.

Declaration

func textShouldBeginEditing(_ textObject: NSText) -> Bool

Parameters

  • textObject:

    The text object requesting permission to begin editing.

Return Value

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

Discussion

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 true, 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

Related Documentation

Editing Text in Cells