Nib not awoken
Nib not awoken
- Subject: Nib not awoken
- From: Bruce Cresanta <email@hidden>
- Date: Tue, 15 Feb 2011 08:49:49 -0700
Hello,
I am using an NSDocument based application and I'm having trouble with the following code:
-(void) analyzePressed
{
NSString * raw = [[[NSString alloc] initWithBytes:[pageData bytes] length:[pageData length] encoding: NSUTF8StringEncoding] retain];
id analyzerdocument = [[NSDocumentController sharedDocumentController] openUntitledDocumentOfType:@"AnalyzerType" display:YES];
[analyzerdocument setSourceTextView:raw];
}
When I create the document off the sharedDocument controller, the nib hasn't fully awoken until after the setSourceTextView selector is called. My File's Owner is set correctly with references to a text view. The setSourceTextView is just a wrapper to [sourceTextView setString:string]. How do I make sure the nib is loaded before calling my set routine?
Thanks,
Bruce
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden