Re: IBOutlet, multiple nibs, method duplication
Re: IBOutlet, multiple nibs, method duplication
- Subject: Re: IBOutlet, multiple nibs, method duplication
- From: Trygve Inda <email@hidden>
- Date: Wed, 04 Jun 2008 19:46:49 +0000
- Thread-topic: IBOutlet, multiple nibs, method duplication
> On Wed, Jun 4, 2008 at 8:17 PM, Trygve Inda <email@hidden> wrote:
>
>> I'd need two instances of WindowController.
>
> The way I see it, you have a choice: either a single instance of a
> controller with 2n outlets, or two instances of a controller with n
> outlets.
>
> If you want to have "one controller object handle group A regardless
> of being main/aux", it's the former, and you end up with two copies of
> near-identical code.
>
> If you want to have one controller *class* handle group A, it's the latter.
>
> Which of these is the better option may depend on the rest of your
> business logic...
>
> Hamish
>
I suppose I could have something like:
IBOutlet NSView mainView
IBOutlet NSView auxView
NSView myView
Wire the main and aux views to two different nibs, then in the init code,
set myView to either main or aux depending on which nib I am using.
Thoughts?
Can one class be wired like this into two different nibs?
Trygve
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden