开发者

NSTextView doesn't initialize when I call readFromData:(NSData *)data ofType:(NSString*)string

开发者 https://www.devze.com 2022-12-20 11:49 出处:网络
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

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.

0

精彩评论

暂无评论...
验证码 换一张
取 消