• 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
NSWindowController and makeWindowController
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

NSWindowController and makeWindowController


  • Subject: NSWindowController and makeWindowController
  • From: Jason Swain <email@hidden>
  • Date: Fri, 24 Jun 2005 11:10:06 +0100

I've added a NSWindowController subclass to my application that was previously only using an NSDocument. Now I have a problem with loading files that I cannot understand. Perhaps someone could clarify what I am doing wrong?

First here is my makeWindowControllers:

- (void)makeWindowControllers
{
    windowController = [[MyWindowController alloc] initWithWindowNibName:@"MyDocument"]; 
    [self addWindowController:windowController]; 
}

What I see happens is that loadDataRepresentation:ofType: is called and the data is loaded just as before. Then makeWindowControllers is called which creates a new windowController.

This is where it goes wrong. I think that my windowController then creates a new (empty) document and finishes initialisation. This has the result of getting my document window with no data in it. I'm sure I am doing something simple wrong, probably because my understanding of NSWindowController is incomplete, can anyone tell me what I should do?


Jason Swain

email@hidden

mobile +44 7917 524 192


 _______________________________________________
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

  • Follow-Ups:
    • Re: NSWindowController and makeWindowController
      • From: Jason Swain <email@hidden>
  • Prev by Date: Re: Open Recent
  • Next by Date: Re: NSWindowController and makeWindowController
  • Previous by thread: Re: Formatter questions
  • Next by thread: Re: NSWindowController and makeWindowController
  • Index(es):
    • Date
    • Thread