NSWindowController and makeWindowController
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?
|
_______________________________________________
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