• 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: Tue, 03 Jun 2008 21:48:05 +0000
  • Thread-topic: IBOutlet, multiple nibs, method duplication

> Hi, Trygve,
>
> With regard to your code duplication, I would use a common
> NSWindowController superclass, with a subclass for your main window
> and a subclass for your aux window.  Then you can just use the right
> nib name in each of them, but leave the rest of the code identical.
>
> Cheers,
> Andrew

Hmmm... That might not be possible. The Main window is the System
Preferences window... So this is also my master app controller.

So in my app controller there are 6 methods tied via IBOutles to the view
within System Prefs, and a different controller for aux windows.

Thoughts?

The trouble is that the code is the same, but IBOutlet NSSOmeView myView
will point to a control in either the main our aux nib depending on which
controller it is from.

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: Andrew Merenbach <email@hidden>
References: 
 >Re: IBOutlet, multiple nibs, method duplication (From: Andrew Merenbach <email@hidden>)

  • Prev by Date: Re: Get and set "Auto adjust brightness when ambient light changes" preferences
  • Next by Date: Re: Copying NSTextStorage
  • Previous by thread: Re: IBOutlet, multiple nibs, method duplication
  • Next by thread: Re: IBOutlet, multiple nibs, method duplication
  • Index(es):
    • Date
    • Thread