Originally posted by gabrielf:
How do I access and change the text in a NSTextView? I've looked in the java browser and on Apple's cocoa pages but I can't find it.
I'm looking for something like NSTextView.setText("My text");
/Gabbe
NSText, NSTextView's superclass, has setString which will do the job.
You can also replace a portion of the text with replaceCharactersInRange(NSRange, String).
For more sophisticated editing, you can use NSAttributedString functions on the text storage of the view, which you get to with textStorage().
Ali