• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: IBOutlet, multiple nibs, method duplication
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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

  • Follow-Ups:
    • Re: IBOutlet, multiple nibs, method duplication
      • From: "Hamish Allan" <email@hidden>
References: 
 >Re: IBOutlet, multiple nibs, method duplication (From: "Hamish Allan" <email@hidden>)

  • Prev by Date: Re: IBOutlet, multiple nibs, method duplication
  • Next by Date: Re: garbage collection and WebKit plugins
  • Previous by thread: Re: IBOutlet, multiple nibs, method duplication
  • Next by thread: Re: IBOutlet, multiple nibs, method duplication
  • Index(es):
    • Date
    • Thread