Re: views from nibs
Re: views from nibs
- Subject: Re: views from nibs
- From: James Spencer <email@hidden>
- Date: Wed, 19 Oct 2005 19:12:14 -0500
On Oct 19, 2005, at 3:25 PM, Craig Hopson wrote:
Disclaimer: I'm new to Cocoa and clueless. I have tried the
archives and samples, but cannot find anything that seems to
pertain (there's that clueless-ness coming into play) to my
situation...
I have a custom view 'A' which contains two other custom views.
In the window, I want to be able to toggle between a single
instance of 'A' and any number of 'A's stacked upon each other in a
sort of list format. I would like to control both orientations via
a single WindowController. How do I load from a nib - OK, I know
I can use loadNibNamed and I assume that the 'Owner' is the
controller. But, how do I manage each instance so that I can have
connections to all of the views?
There are lots of ways but one is to subclass NSWindowController,
adding outlets for your views. Read the subclass' header into IB and
set the class for the File Owner to be your custom subclass. Then
you can connect the views to the new outlets.
Spence
James P. Spencer
Rochester, MN
email@hidden
"Badges?? We don't need no stinkin badges!"
_______________________________________________
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