Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Mulitple controllers being made




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%20Reference%20Library/ 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:
http://lists.apple.com/mailman/options/cocoa-dev/email@hidden

This email sent to email@hidden
References: 
 >Mulitple controllers being made (From: Mark Dawson <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.