NSTreeController add, addChild, remove
NSTreeController add, addChild, remove
- Subject: NSTreeController add, addChild, remove
- From: Gordon Apple <email@hidden>
- Date: Thu, 23 Aug 2007 09:02:14 -0500
So far, I have a hierarchy of objects, a set of tables with tab views,
and a chain of NSArrayControllers that allow me to create and manage the
chain. Each level handles a different class, all of which inherit from the
same base object which has the subarray and properties dictionary. All is
well there.
I have two supertabs, one with the above set of tabs, one containing an
outline view. I want to display and control the same hierarchy of objects
from the outline view. I did manage to invoke the proper incantations to
get the outline view to display and correctly control disclosure triangles.
I have connected buttons for add, addChild, and remove. However, I have not
been able to get them to function properly other than add/remove at the top
level of the hierarchy.
It appears that I will have to subclass NSTreeController and override
newObject, add, and addChild, plus add a BOOL so that NewObject can figure
out what class of object to add. However, "remove" should work for any
class, but it doesn't (except when selecting the top level).
Any words of wisdom? Is NSTreeController still broken in 10.4.10? I
haven't tried 10.5 yet. Any better? Do you have to use NSTreeNode, or is
that hidden?
_______________________________________________
Cocoa-dev mailing list (email@hidden)
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:
This email sent to email@hidden