• 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: Simple NSWindowController (or window in secondary nib)
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Simple NSWindowController (or window in secondary nib)


  • Subject: Re: Simple NSWindowController (or window in secondary nib)
  • From: Graham Cox <email@hidden>
  • Date: Sun, 7 Feb 2010 16:14:51 +1100

On 07/02/2010, at 3:52 PM, Trygve Inda wrote:

> The checkboxes window is in is own nib
[]

> Any drawback to this?
>
> It seems like overkill to create a custom class to manage the checkbox
> window when all the checkboxes are controlled by bindings and there is only
> an OK/Cancel button.
>
> Any thoughts on a design pattern for this situation?


The drawback is that by putting it into a separate nib you've made a simple situation a lot more complex.

Why not just but the checkbox window in the same nib as the one where the table view is? Unless you intend to use the checkbox window for several different unrelated situations, it may as well be in the same nib, since it is really part of the same interface, albeit an auxiliary part of it. Then, you can also instantiate its window controller in the same nib and hook the whole thing together to an outlet in the tableview's controller. The actual window won't be made until it's first used, and the rest of it is a very small overhead indeed in both time to load and memory use. It will be well worth it in terms of making the whole thing far easier to code.

--Graham


_______________________________________________

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: Simple NSWindowController (or window in secondary nib)
      • From: Trygve Inda <email@hidden>
References: 
 >Simple NSWindowController (or window in secondary nib) (From: Trygve Inda <email@hidden>)

  • Prev by Date: Simple NSWindowController (or window in secondary nib)
  • Next by Date: Re: Simple NSWindowController (or window in secondary nib)
  • Previous by thread: Simple NSWindowController (or window in secondary nib)
  • Next by thread: Re: Simple NSWindowController (or window in secondary nib)
  • Index(es):
    • Date
    • Thread