I have an NSTextView that users will type text into. I am using this instead of an NSTextField because I need it to support adding a new line when the user hits enter (This doesn't seem to work with NSTextField, but it does with NSTextView)
I can't for the life of me figure out how to get all the text out of the NSTextView.
This SO answer tells me how to do it in Objective-C:
How to find the text in an NSTextView?
But I'm having a hard time making the jump to Swift. If I try to cast the textStorage property to NSAttributedString, I get the error "Cannot convert the expression type NSTextStorage? to type NSAttributedString".
This is an OSX application, not an iPhone application, if that makes any difference for some reason.
Thanks in advance for the help.