Can't get an NSDocument subclass to load nib...
Can't get an NSDocument subclass to load nib...
- Subject: Can't get an NSDocument subclass to load nib...
- From: Jiva DeVoe <email@hidden>
- Date: Sat, 22 Jun 2002 22:53:15 -0700
I have created an NSDocument subclass and set it as the owner for a nib
file. I have also overridden the method "windowNibName" in the document to
return the name of the nib file (sans extension). Yet, when I init the
document, it doesn't seem to call windowNibName at all, and thus, I get no
NSWindowControllers for it. Is there some special initializer syntax I need
to call for this to work? Here's my init n stuff:
-(id)init
{
NSLog(@"PersonDocument init");
self = [super init];
return self;
}
-(void)windowControllerDidLoadNib:(NSWindowController *) aController
{
[super windowControllerDidLoadNib:aController];
NSLog(@"Loaded the window.");
}
- (NSString *)windowNibName
{
NSLog(@"returning window nib name.");
// Implement this to return a nib to load OR implement
-makeWindowControllers to manually create your controllers.
return @"PersonDocument";
}
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.