Re: NSTreeController - Remove Children
Re: NSTreeController - Remove Children
- Subject: Re: NSTreeController - Remove Children
- From: Kyle Sluder <email@hidden>
- Date: Sat, 14 Feb 2009 17:22:11 -0500
On Fri, Feb 13, 2009 at 6:49 PM, none given <email@hidden> wrote:
> I cannot seem to find how to do this by code, that is, for example, remove from the tree all of Node2 children...
NSTreeNode has a -childNodes method. I'd use that to recursively
determine if each node has children, and then add those children to an
array of index paths to be deleted. Then it's a matter of
-[NSTreeController removeObjectsAtArrangedObjectIndexPaths:].
--Kyle Sluder
_______________________________________________
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