Re: Need help : Multiple views in NSDrawer
Re: Need help : Multiple views in NSDrawer
- Subject: Re: Need help : Multiple views in NSDrawer
- From: Roarke Lynch <email@hidden>
- Date: Wed, 31 Dec 1969 19:57:02 -0500
I would suggest doing one of two things (at least this is I would
implement it)
(1) create three separate drawers, and control which is out
progamtically. This would prob be to slow
or
(2) in your drawers place a tab view without the tabs and promatically
control which tab is visable
On Monday, July 22, 2002, at 06:19 PM, kubernan wrote:
Hello,
I'd like to do some interesting things with my parent window and its
drawer but
i have some difficulties :
The content of the drawer can have different views depending on what we
select
in the parent window. For example :
Selection x in parent window --> open the drawer with the view x (and
its content)
Selection y in parent window --> open the drawer with the view y "
Selection z in parent window --> open the drawer with the view z "
What i decided to do is to create 3 subclasses view, called (following
the
example) x y and z.
I also create 3 controllers, each contains an outlet connected to the
appropriate view :
controller x has the view x.
I generate the file for the controllers and the views.
Now i have to display the selected view in my drawer and this is where
i have difficulties : the
selected view and its content doesn't appears in the drawer.
It seems i have to do something like that.
theParentWindowController.m
-(void)openMyDrawerWithXView
{
id selectedController = nil;
id viewX;
selectedController = [[[theXController alloc] init] retain];
viewX = [[IBView alloc] initWithFrame:[[myDrawer contentView] frame]];
[myDrawer setContentView:viewX];
[myDrawer open];
}
There are two problems :
1- As I said, the drawer seems to be empty :-(
2- Other thing i don't understand : I have a log message (NSLog) in the
theXController init method. It appears the log message is displayed
twice : first time when the parent window controller (the "main"
controller) is loaded + after calling the openMyDrawerWithXView method.
Roarke Lynch
-------------------------------
email@hidden
_______________________________________________
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.