After looking at the documentation, I cannot find an easy way to get the index path of an object in the NSOutlineView or NSTreeController to which it is bound. As a result, I ended up writing really ugly code, trying to compose the index itself when I need to do something they need (like removing certain elements from a tree).
Is there a better way to do this than [[NSIndexPath indexPathWithIndex:<blah>] indexPathByAddingIndex: <blah>] ?
source share