• 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
IBOutlet, multiple nibs, method duplication
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

IBOutlet, multiple nibs, method duplication


  • Subject: IBOutlet, multiple nibs, method duplication
  • From: Trygve Inda <email@hidden>
  • Date: Tue, 03 Jun 2008 21:21:56 +0000
  • Thread-topic: IBOutlet, multiple nibs, method duplication

Hi All,

Sorry for the vague subject title... Let me explain.

I have one window per attached screen so at least one, but perhaps 3 (for
example). There is always one "main" window and the others are considered
"aux windows".

The Main window has 4 groups of controls (A, B, C, D).
The Aux windows have only group A.

I would like to have one controller object handle group A regardless of
being main/aux.

Currently I have 6 methods in "mainWindowController" which are identical to
6 methods in "auxWindowController". auxWindowController has an additional
method or two used to create and center the window from auxWindowNib

It'd be nice to not have this duplication.

The main window and aux window use different Nibs so each nib has a
"somePopupMenu" and each controller has an IBOutlet... MyPopupMenu

Etc.

Since the IBOutlets in Main point to a different Nib than the IBOutlets in
Aux (even though they are functionally identical) is there a good, clean way
to manage this?

Or is it better to keep them separate and just have 6 methods that are 99%
the same in different objects. (Basically the Aux controller is a subset of
Main Controller, but is not really a child).

Thanks,

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>
    • Re: IBOutlet, multiple nibs, method duplication
      • From: Andrew Merenbach <email@hidden>
  • Prev by Date: Re: Apple Remote and exclusivity
  • Next by Date: Re: IBOutlet, multiple nibs, method duplication
  • Previous by thread: Re: Core Data merge and "statement is still active" error?
  • Next by thread: Re: IBOutlet, multiple nibs, method duplication
  • Index(es):
    • Date
    • Thread