Re: multiple windowcontrollers
Re: multiple windowcontrollers
- Subject: Re: multiple windowcontrollers
- From: Mike Ferris <email@hidden>
- Date: Thu, 24 Jun 2004 07:50:27 -0700
I am not sure unsetting visible on launch in IB will do the trick for
making the second controller show up... I am pretty sure that
NSDocument will go through the window controllers created by
-makeWindowControllers and make them all visible.
However, if you don't need to show the info window immediately, you
should avoid paying for it until you need it... I would suggest that
you make your -makeWindowControllers create only the main window
controller. -show2ndWindow: action should then create the info window
controller and add it to the document the first time it is called.
There's no restriction that you have to create all your window
controllers right up front...
Mike
Begin forwarded message:
>
From: Darrin Cardani <email@hidden>
>
Date: June 24, 2004 6:36:53 AM PDT
>
To: email@hidden
>
Subject: Re: multiple windowcontrollers
>
>
At 10:00 PM -0700 6/23/04, Koen van der Drift <email@hidden>
>
wrote:
>
> I have a document based app with a main window and another window that
>
> displays some info on the contents of the main window. I might even
>
> add a third window used as a 'search window'.
>
>
>
> Is it correct to add more than one wndowControllers in MyDocument:
>
>
>
> -(void)makeWindowControllers
>
> {
>
> IDMainWindowController *controller = [[IDMainWindowController
>
> allocWithZone:[self zone]] init];
>
> IDSecondWindowController *secondController =
>
> [[IDSecondWindowController allocWithZone:[self zone]] init];
>
>
>
> [self addWindowController:controller];
>
> [self addWindowController:secondController];
>
>
>
> [controller release];
>
> [secondController release];
>
> }
>
>
That's essentially how I've done it.
>
>
> I don't want the 2ndWindow to open immediately, but only after the
>
> user
>
> selects a menu item.
>
>
Just uncheck the "visible on open" trait in Interface Builder.
>
>
Darrin
>
--
>
Darrin Cardani - email@hidden
>
President, Buena Software, Inc.
>
<http://www.buena.com/>
>
Video, Image and Audio Processing Development
>
_______________________________________________
>
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.
_______________________________________________
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.