Re: NSTreeController: how do I select a model object?
Re: NSTreeController: how do I select a model object?
- Subject: Re: NSTreeController: how do I select a model object?
- From: Jens Alfke <email@hidden>
- Date: Tue, 15 Oct 2013 07:39:54 -0700
On Oct 15, 2013, at 12:53 AM, Charles Srstka <email@hidden> wrote:
> I've found that it's far more efficient to recurse *up* the NSTreeNode hierarchy — e.g. start with the object you're looking for, then look at its parent, then its grandparent, etc. until you end up at the root.
But I don’t have an NSTreeNode at all. I have a model object, and I’m trying to find the tree node that corresponds to it.
If I already had an NSTreeNode I would just get its indexPath property; problem solved, no recursion needed.
—Jens
_______________________________________________
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