I have been looking through the documentation and found a command to add text to an NSTextView, but no mention of getting the content of the text view. Can this be done?
I have tried stringValue() and |text|(), both of which don’t work.
I’m sure there’s logic and reasoning behind it, but I found it confusing and irritating at first that one type of field would use string() and another type of field would use stringValue(). I still have trouble remembering which is which if I’ve been away from dealing with fields for a while.
NSTextView is a subclass of NSText thats the reason. Knowing how Objective-C’s parenting chain works you should know that when the instance method is not found it will be send to the super class. It’s the same as that the NSOutlineView inherits methods from NSTableView because it’s a subclass of that.