Instance Method

textShouldEndEditing(_:)

Performs validation on the receiver’s new value.

Declaration

func textShouldEndEditing(_ textObject: NSText) -> Bool

Parameters

textObject

The text object requesting permission to end editing.

Return Value

true if the new value is valid; otherwise false.

Discussion

This method validates the receiver's new value using the NSCell method isEntryAcceptable:. If the new value is valid and the delegate responds to control(_:textShouldEndEditing:), invokes that method and returns the result, in addition beeping if the delegate returns false. See the NSControl class specification for more information on the text delegate method.

See Also

NSText Delegate Method Implementations

func textShouldBeginEditing(NSText) -> Bool

Requests permission to begin editing a text object.

func textDidBeginEditing(Notification)

Posts a notification that the text is about to begin editing to the default notification center.

func textDidChange(Notification)

Posts a notification that the text has changed and forwards this message to the receiver’s cell if it responds.

func textDidEndEditing(Notification)

Handles an end of editing.