On 06/11/2009, at 5:38 AM, Fritz Anderson wrote:

> Here is what I did, for a small tree: My document keeps the root object as a 
> KVO property -- I do not rely on a fetch.
> 
> I declare classes for my tree-element entities. so I could implement a 
> method, -(NSArray *)orderedChildren, to return the "children" set, sorted as 
> needed.
> 
> I exposed the document (and thus, indirectly, the root) through an 
> NSObjectController.
> 
> I bound the tree controller's content _array_ to that root object's 
> orderedChildren key. (Document NSObjectController -> root.orderedChildren). 
> Members of the content array appear as top-level nodes in the outline.
> 
> My tree has constant structure, so I can't make any comment on mutation.


Hi Fritz,

Thanks for this pointer. Unfortunately, while this works great for a static 
tree, it fails when you try to mutate the tree objects. :-/

--
Rob Keniger



_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to