Re: Mulitple controllers being made
Re: Mulitple controllers being made
- Subject: Re: Mulitple controllers being made
- From: John Terranova <email@hidden>
- Date: Thu, 27 Jul 2006 21:57:37 -0700
On Jul 27, 2006, at 8:38 PM, Mark Dawson wrote:
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];
My makeWindowControllers in my Document object looks like this:
- (void)makeWindowControllers
{
windowController = [[DWindowController alloc] init];
[self addWindowController:windowController];
}
My WindowController then has this code:
- (id)init
{
self = [super initWithWindowNibName:@"DDLBookletWindow"];
return self;
}
- (id)initWithWindowNibName:(NSString *)st
{
NSAssert1(NO, @"Don't call initWithWindowNibName - especially with %
@!", st);
return [self init];
}
I got this locally from file:///Developer/ADC Reference Library/
documentation/Cocoa/Conceptual/Documents/Tasks/FAQ.html#//apple_ref/
doc/uid/20000954-1081429
or online from
http://developer.apple.com/documentation/Cocoa/Conceptual/Documents/
Tasks/FAQ.html#//apple_ref/doc/uid/20000954-1081429
john
Fight war, not wars.
_______________________________________________
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