Re: Convert NSArray to NSString

2008-04-12 Thread Ben Lachman
I assume you mean selectedRanges, which returns an NSArray of ranges. This array contains NSValue objects that represent ranges of selected text, not actually the text that is selected. To get the text that is selected you have to do a bit more work. First you need to the get string of t

Re: Convert NSArray to NSString

2008-04-12 Thread Michael Vannorsdel
The textStorage of the NSTextView is actually an NSMutableAttributedString subclass so you can treat it as such and get the text and attributes from it. On Apr 12, 2008, at 6:48 PM, Lincoln Green wrote: I am trying to store the selected text in an NSTextView in an NSString/NSMutableStrin