• 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: Instantiating window from nib
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Instantiating window from nib


  • Subject: Re: Instantiating window from nib
  • From: James DiPalma <email@hidden>
  • Date: Mon, 15 Oct 2001 10:51:24 -0700

On Saturday, October 13, 2001, at 08:31 PM, Jeff LaMarche wrote:
In all the examples and tutorials I've seen, window controller objects
are usually subclassed from NSObject; I've seen NSWindowController used
only in the context of Cocoa's multi-document architecture.

I notice that NSWindowController has a method called
(id)initWithWindowNibName:(NSString *)windowNibName.

On Sunday, October 14, 2001, at 10:59 AM, Drew McCormack wrote:
You do indeed subclass NSWindowController.

Are there advantages to using NSWindowController? Its design seems to provide many of its features for NSDocument (or any document) window: all of the relevant features in the doc can easily be done in IB for a non-document window. Using an NSWindowController simply to load a nib file seems like an unnecessary introduction of a somewhat confusing class.

Using NSBundle to load a nib file seems to be easier for a non-NSDocument based application. I would also recommend against NSWindowControllers for things like inspectors, preferences and stuff like that.


-jim


  • Follow-Ups:
    • Re: Instantiating window from nib
      • From: Jeff LaMarche <email@hidden>
References: 
 >Re: Instantiating window from nib (From: Drew McCormack <email@hidden>)

  • Prev by Date: Re: NSBrowser
  • Next by Date: Re: Q's about Obj-C
  • Previous by thread: Re: Instantiating window from nib
  • Next by thread: Re: Instantiating window from nib
  • Index(es):
    • Date
    • Thread