Re: class changes and serialized objects in a nib file
Re: class changes and serialized objects in a nib file
- Subject: Re: class changes and serialized objects in a nib file
- From: Chris Hanson <email@hidden>
- Date: Wed, 30 Nov 2005 10:53:17 -0800
On Nov 30, 2005, at 8:45 AM, A. Blue wrote:
@interface classA : NSWindow
{
IBOutlet NSWindow *window;
IBOutlet SlideView *aView;
}
One other thing I forgot to point out. A lot of (non-Cocoa)
frameworks encourage you to subclass a Window or Form class as part
of "normal" document-based application development, and add the
controls in the window and utility windows to that subclass as
instance variables.
With most frameworks, including Cocoa, this is actually unnecessary
and can lead to a more confusing class hierarchy than necessary.
Instead, you generally want to implement some form of controller
class whose instances manage both a window and its contents.
In Cocoa this would generally be an NSWindowController subclass. If
you're building a document-based application where a document can be
represented by multiple open windows, you can even associate multiple
window controllers with a single document, one per type of window.
Generally, I would only subclass a framework's Window class if I
wanted to create a new kind of window, such as a round window.
-- Chris
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden