NSTreeController - Remove Children
NSTreeController - Remove Children
- Subject: NSTreeController - Remove Children
- From: none given <email@hidden>
- Date: Fri, 13 Feb 2009 15:49:58 -0800 (PST)
I have a NSTreeController with:
Node1
--- value1
--- value2
Node2
--- value1
--- value2
--- value3
With the following, I am able to remove a user selection:
[treeController removeObjectsAtArrangedObjectIndexPaths:[treeController selectionIndexPaths]];
I cannot seem to find how to do this by code, that is, for example, remove from the tree all of Node2 children...
I tried with something like the following, but it only removes the node itself...
[treeController setSelectionIndexPath:[NSIndexPath indexPathWithIndex:1]];
How can I remove a node's children, while retaining the node itself?
Tia,
S.
_______________________________________________
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