Re: Instantiating window from nib
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