::Edit:: It works now? haha, maybe I just didn't save my latest IB...who the hell knows. Thanks!
Hey,
This is my first time playing around with desktop applications (I have experience with iphone applications) and I'm stuck - My text view will not update to show any text:
.m:
@synthesize textView;
NSString *txt = [[[NSString alloc] initWithData:responseData encoding: NSASCIIStringEncoding] autorelease];
NSLog(@"txt = %@", txt);
[textView setString:txt];
.h:
IBOutlet NSTextView *textView;
}
@property(nonatomic, retain) IBOutlet NSTextView *textView;
And IB says textView -> Text View, so everything looks good:
So, what am I missing?
Double check if the outlets are done in IB. That's probably the reason (textView is probably nil here).
Where is this setString code being called? It's possible the IB outlet isn't instantiated yet. You can check this with a simple
if (textView) {
NSLog(@"textView is not nil);
} else {
NSLog(@"textView is nil");
}
To be sure that everything is set up when you call this, make sure it's after 'awakeFromNib' is called in any objects created through IB.
See NSNibAwaking Protocal
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