• 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
multiple document windows
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

multiple document windows


  • Subject: multiple document windows
  • From: Mark Friedman <email@hidden>
  • Date: Mon, 5 Jun 2006 21:59:45 -0400

I have a core data application with two data models. Each model corresponds to its own document type. Each NSPersistentDocument sub- class overrides makeWindowControllers to add its own window controller/windowNib to present the data. New documents of the first document type listed in info.plist are created with the standard "New" menu command and this works fine. I added a menu item for the second type (which appears in info.plist) which targets the following code:

- (IBAction)newDogDocument:(id)sender {
NSString *typeName = @"Dog Document";
NSDocumentController* documentController;
NSError *error = nil;
NSDocument *aDocument;
documentController = [NSDocumentController sharedDocumentController];
aDocument = [documentController makeUntitledDocumentOfType:typeName error:&error];
[documentController addDocument:aDocument];
[aDocument makeWindowControllers];
[aDocument showWindows];
}


I can step through this code, watch the variables, and see Nib and controller names that look correct but no window appears and I get this message:

[<DogDocument 0x3a5fa0> valueForUndefinedKey:]: this class is not key value coding-compliant for the key courseDiagramController.

DogDocument is the class of the second document type but courseDiagramController is the window controller for the first type. Can anyone tell me what I'm doing wrong?

Mark Friedman

_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


  • Prev by Date: Re: recieving mouseMoved: events when inactive
  • Next by Date: stringWithContentsOfURL: usedEncoding: error:
  • Previous by thread: Re: NSMovieView & Apple's Protected Video
  • Next by thread: stringWithContentsOfURL: usedEncoding: error:
  • Index(es):
    • Date
    • Thread