My second day working with Cocoa. I've got an NSTextView set up, its attributed string is bound to an NSArrayController (I'm using Core Data):
controller key: selection
model key path: myString
I've read that an NSTextView needs an NSAttributedString, which is why it's throwing an exception when trying to set the value of the attribute.
NSInvalidArgumentException', reason: 'Unacceptable type of value for attribute: property = "myString"; desired type = NSString; given type = NSConcreteAttributedString;
Any ideas how I can get my managedObject's NSString attribute to be shown in an NSTextView?
You can bind your NSString to NSTextView's value
instead of attributedString
. For this, you need to turn off "Rich Text" for NSTextView.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With