user1032657
user1032657

Reputation: 2471

How to tell when user selects text in NSTextView

I have an NSTextView and want to be able to tell when the user highlights (selects) a portion of the text, so that I can make changes to it. The NSTextViewDelegate protocol doesn't seem to have a method for this. Is there a way to capture this event?

Upvotes: 2

Views: 94

Answers (1)

Vervious
Vervious

Reputation: 5569

Are you sure - (void)textViewDidChangeSelection:(NSNotification *)aNotification doesn't do the trick? It's part of NSTextViewDelegate (reference). If it doesn't work the way you want, what specifically are you looking for?

Upvotes: 1

Related Questions