NSTextView doesn't initialize when I call readFromData:(NSData *)data ofType:(NSString*)string
I have a refreshDisplay: method that calls the setString: method of an NSTextView. I can save, and load, but when I load even though my program loads the data, it does not display it on the NSTextView as it should. I d开发者_运维知识库id a check and that NSTextView seems to be nil when I load, which is why the setString: method does not do anything to it. I thought this textView would be initialized by interface builder. Any suggestions? Thanks.
Is the text view marked as an IBOutlet
in your class's interface, and are you sure it is properly connected to the appropriate object in your nib? If it is, then there should be no reason for your NSTextField
ivar to be nil
.
精彩评论