Global Variable

NSTextViewDidChangeSelectionNotification

Posted when the selected range of characters changes.

Declaration

NSNotificationName NSTextViewDidChangeSelectionNotification;

Discussion

NSTextView posts this notification whenever setSelectedRange:affinity:stillSelecting: is invoked, either directly or through the many methods (mouseDown:, selectAll:, and so on) that invoke it indirectly. When the user is selecting text, this notification is posted only once, at the end of the selection operation. The text view's delegate receives a textViewDidChangeSelection: message when this notification is posted.

The notification object is the notifying text view. The userInfo dictionary contains the following information:

Key

Value

@"NSOldSelectedCharacterRange"

An NSValue object containing an NSRange structure with the originally selected range.

See Also

Notifications

NSTextViewWillChangeNotifyingTextViewNotification

Posted when a new text view is established as the text view that sends notifications.

NSTextViewDidChangeTypingAttributesNotification

Posted when there is a change in the typing attributes within a text view.