Figuring out the way the document classes work together. Some questions.
Figuring out the way the document classes work together. Some questions.
- Subject: Figuring out the way the document classes work together. Some questions.
- From: "Jose L. Hales-Garcia" <email@hidden>
- Date: Sat, 29 Jun 2002 17:18:40 -0700
My application opens two types of windows: document windows
and console windows.
The delegate for the console's nib objects is a NSWindowController
class. It encapsulates tasks, pipes and the input and output to the
window. All works except for one thingthe method I've defined
to override windowTitleForDocumentDisplayName is not called.
Which class calls this method? One of the three document
classes? The delegate class?
To complete the picture the delegate for the MainMenu nib is an NSObject
class. It creates instances of the window controllers for the various
windows. For example, the consoles are created with this method
by my MainMenu delegate:
- (IBAction)newConsoleWindow:(id)sender {
ConsoleController *console = [[ConsoleController alloc] init];
[console showWindow:self];
}
The console controllers are initialized like...
- (id)init {
self = [super initWithWindowNibName:@"Console"];
return self;
}
In studying the problem more questions about the way the document
classes work together come up, in particular when NSDocument is
taken out of the loop. NSDocumentController surely is aware of the
console windows that are created. Can I use NSDocumentController
to get information about the windows that exist? Or do I keep track of
quantity and types of windows independently? Are these simple
initializations of the console windows enough?
Jose
_______________________________________________
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.