Odd error when opening a nib file
Odd error when opening a nib file
- Subject: Odd error when opening a nib file
- From: JArod Wen <email@hidden>
- Date: Tue, 29 Jul 2008 13:12:22 -0400
Hi jedis,
I met an odd error when opening a nib file, using the following code:
-(void)loadGraphicsController{
if (graphicsController == NULL) {
graphicsController = [[GraphicsController alloc] init];
if (![NSBundle loadNibNamed:@"GraphWindow"
owner:graphicsController]) {
NSLog(@"Error loading GraphController");}
else{
NSLog(@"GraphController NIB Loaded");
}
}
}
When it goes to [NSBundle loadNibNamed:owner:], there is an error
showed in debug window:
Cannot create int from object <NSApplication: 0x413df0> of class
NSApplication
and the step-by-step debug after this line will jump to a method
called [NSCarbonMenuImpl performActionWithHighlightingForItemAtIndex:].
Since there are several NSPopupButton in the nib file, and also
NSCarbonMenuImpl is used when initializing the pop-up menu(reference: http://www.cocoadev.com/index.pl?NSCarbonMenuImpl)
, is there anyway I can fix this error?
Thanks in advance!
---------------
JArod Wen
_______________________________________________
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