After poring through the documentation, I can find no reasonably easy way to get the index path of an object in an NSOutlineView
or the NSTreeController
it's bound to. As a result, I've ended up writing really ugly code trying to assemble an index path myself whenever I need to do something that requires them (removing specific items from the tree, for instance).
Is there no better way to do this than [[NSIndexPath indexPathWithIndex:<blah>] indexPathByAddingIndex: <blah>]
?