views:

263

answers:

1

Hi all,

I've an NSTextView with with several semi-colon separated strings. I need to find on which of those strings the caret has been placed. How could I do that?

+3  A: 
NSInteger insertionPoint = [[[myTextView selectedRanges] objectAtIndex:0] rangeValue].location;
Art Gillespie