Re: Data Source object for NSTableView
Re: Data Source object for NSTableView
- Subject: Re: Data Source object for NSTableView
- From: mmalcolm crawford <email@hidden>
- Date: Sat, 21 Feb 2004 10:50:53 -0800
On Feb 21, 2004, at 9:39 AM, Ryan Bates wrote:
On Feb 19, 2004, at 10:38 PM, Jerry Krinock wrote:
I'm thinking of wiping out my Data Source object, and incorporating
all its
methods and data into the File Owner, my subclassed
NSWindowController. Is
that the correct way to do it? If not, what object type should it be
a
subclass of?
I find if I throw everything at the window controller then it starts
to get very complicated and unorganized. Now I try to keep most of my
UI handling in several smaller controller classes and the window
controller ties these classes all together. One example is a
TableViewController which acts as both the data source and the
delegate. [...]
This is, of course, the pattern that the new NSController classes
follow...
It is a little bit tricky keeping the two arrays in sync when some of
the data changes, but for me it is well worth it for a cleaner design.
with the advantage that they keep data in sync for you.
mmalc
_______________________________________________
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.