Contents

hasMarkedText()

Returns a Boolean value indicating whether the receiver has marked text.

Declaration

func hasMarkedText() -> Bool

Return Value

true if the receiver has marked text; otherwise false.

Discussion

The text view itself may call this method to determine whether there currently is marked text. NSTextView, for example, disables the Edit > Copy menu item when this method returns true.

See Also

Handling marked text