Question

I have a scroll view with text views. How do I find which text view is currently selected?

The delegate methods in NSTextDelegate only see to work once you start editing not when it's first selected.

Was it helpful?

Solution

An NSTextView needs to be the first responder to be selected. You could override

-(void)becomeFirstResponder;

throw a notification with an id, to find out which NSTextView was selected.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top