Reputation: 1987
I want to find something that is the equivalent of [fieldName stringValue] for NSTextField, but for NSTextView. My understanding is that the stringValue property doesn't exist for the NSTextField because this field supports richer text.
Despite much googling I can't figure out how to just get the raw text content of the NSTextView. The only reason I'm using the NSTextView and not NSTextField is so I can have scroll bars...
Definitely a newb question!
Thanks in advance.
Upvotes: 3
Views: 2705
Reputation: 14694
NSTextField is a subclass of NSText, which has a "string" method. Try this:
[myTextField string];
It should work as needed.
Upvotes: 9