NSTreeController (was: Re: Cocoa bindings and NSOutlineView)
NSTreeController (was: Re: Cocoa bindings and NSOutlineView)
- Subject: NSTreeController (was: Re: Cocoa bindings and NSOutlineView)
- From: Allan Odgaard <email@hidden>
- Date: Wed, 21 Apr 2004 05:25:25 +0200
On 20. Apr 2004, at 18:49, Kay Roepke wrote:
Is there a reference on using bindings with NSOutlineView yet?
No. NSOutlineView doesn't play yet. Sorry ;-)
The word 'yet' seems to appear quite a lot when talking about the
outline view and bindings.
Did anyone promise that this will ever be realized? did e.g. WebObjects
have something like it (from which I heard bindings were inspired)?
What do people expect from it? probably the essence of what we miss is
something like a reusable NSTreeController, with a "contentTree"
binding which e.g. could be manipulated using valueForKey: and
mutableArrayValueForKey:.
If so, could we perhaps not already write such a general controller?
I guess the most interesting feature of such a controller would be that
one no longer would need to handle insertions and deletions in a tree
structure -- moving items around in the tree (or to a new node, i.e.
grouping) is non-trivial. Although not currently handled by
NSArrayController for table views (that would be required if supporting
drag'n'drop to move items).
But can we actually make it flexible enough? e.g. do we need a delegate
to decide on stuff like if new items is allowed to have children or not
a.s.o. -- and if so, do we end with a delegate which complexity is the
same as a typical outline view data source?
I would love to get some input on this subject!
Btw: I find it interesting that Apple/NeXT provided a protocol to let
table views and outline views retrieve data, and all we want is a
standard controller component which implements this protocol and wraps
for a standard array and a notification system which allow for either
side of this component to learn if the other side makes changes. So
why was it that the table view couldn't just get a pointer to the
array? :)
** Cocoa FAQ: <
http://www.alastairs-place.net/cocoa/faq.txt> **
_______________________________________________
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.