• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Can't get an NSDocument subclass to load nib...
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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.

  • Follow-Ups:
    • Re: Can't get an NSDocument subclass to load nib...
      • From: Brent Gulanowski <email@hidden>
    • Re: Can't get an NSDocument subclass to load nib...
      • From: email@hidden
  • Prev by Date: Re: WARNING: Spam being sent "from" apple.com
  • Next by Date: Re: The Small Developer
  • Previous by thread: Changing formatter for specific cells in the same table column?
  • Next by thread: Re: Can't get an NSDocument subclass to load nib...
  • Index(es):
    • Date
    • Thread