Re: NSTreeController -removeObjectsAtArrangedObjectIndexPath:
Re: NSTreeController -removeObjectsAtArrangedObjectIndexPath:
- Subject: Re: NSTreeController -removeObjectsAtArrangedObjectIndexPath:
- From: Gordon Apple <email@hidden>
- Date: Mon, 08 Oct 2007 15:00:32 -0500
Index paths are a way to specify where you are in a data hierarchy. The
NSIndexPath documentation has a good illustration of this. An index path is
simply an array of each of the array indices that lead to the desired
location. There are methods to remove last index to move up in the
hierarchy or add an index to move down.
My only gripe with NSIndexPath is that it doesn't allow an empty path,
making for extra lines of code when manipulating things at the top level.
For example, moving within the current level by removing an index and then
adding new index does not work at the top level. You have to handle it as a
special case.
> I don't know this method. I'm not sure what the docs mean by "indexPaths".
>
> I'm doing much the same thing (removing a tree of items from a OutlineView)
> with a small recursive function. To wit:
_______________________________________________
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