Re: windowcontroller neccessary?
Re: windowcontroller neccessary?
- Subject: Re: windowcontroller neccessary?
- From: James DiPalma <email@hidden>
- Date: Sun, 12 Jan 2003 23:51:47 -0800
From: Mike Ferris <email@hidden>
If you are using NSDocument then the document windows will always have
a windowController. For non-document windows, you can do what you
like, but NSWindowController is a really good class to start with for
your File's Owner.
I prefer allowing an NSDocument subclass to own a document's primary
nib file. I think a document instance should own and load a single nib
file to initialize an entire document just as an application instance
owns and loads a single nib file to initialize an entire application.
From: matt neuburg <email@hidden>
Also NSWindowController is notified when its window loads. m.
A nib instantiated, nib-connected window-delegate would also get
notified when its window finished loading: see awakeFromNib.
I tend to avoid subclassing an AppKit object unless I will specifically
modify its existing responsibilities. In your case an
NSWindowController does imply some control over its window, so
subclassing to handle delegate messages does make some sense.
I would recommend against using window controllers as view controllers.
Two primary reasons: views may someday move to a new window or a
separate nib, and NSWindowController has no inherent responsibility for
your window's contents (although, some Cocoa documentation and books
recommend/use NSWindowController subclasses).
-jim
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.