Mulitple controllers being made
Mulitple controllers being made
- Subject: Mulitple controllers being made
- From: Mark Dawson <email@hidden>
- Date: Thu, 27 Jul 2006 20:38:06 -0700
I'm misunderstanding how to make a window from a document.
I thought the sequence was in my NSDocument I add:
- (void)makeWindowControllers {
my_MainWindowController *myController = [[my_MainWindowController allocWithZone:[self zone]] initWithWindowNibName:@"MainWindow"];
[self addWindowController:myController];
[myController release];
However, what I'm seeing is that two copies of "my_MainWindowController" are being made. The creation in "makeWindowControllers" calls my init routine. After makeWindowControllers routine completes, though, Cocoa's "ShowWindow" routine ALSO creates another copy.
In the object that was created from the makeWindowControllers call, none of my outlets are hooked up when -awakeFromNib is called (and _window is nil). However, the object made from ShowWindow DOES have my outlets connected up.
What could I be doing wrong to have doube controllers being made?
Thanks,
mark
_______________________________________________
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