It is my first time using NSTextView and I am having a hard time figuring out how it works, I have a line like this:
[[commandHistoryTextView textStorage] appendString:outputString];
and I get this error:
2012-02-24 12:40:52.971 binoclean[37863:703] Exception detected while handling key input.
2012-02-24 12:40:52.971 binoclean[37863:703] -[NSConcreteTextStorage appendString:]: unrecognized selector sent to instance 0x2cca10
2012-02-24 12:40:52.975 binoclean[37863:703] (
0 CoreFoundation 0x9bf55b67 __raiseError + 231
1 libobjc.A.dylib 0x9b5c8149 objc_exception_throw + 155
2 CoreFoundation 0x9bf59170 -[NSObject doesNotRecognizeSelector:] + 256
3 CoreFoundation 0x9bea7da9 ___forwarding___ + 457
...
Any comments appreciated, greatly.
-appendString:is a method on NSMutableString. NSTextStorage is a subclass of NSMutableAttributedString. You could call-appendString:on the textStorage’smutableStringlike so: