• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: NSTreeController: how do I select a model object?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


  • Follow-Ups:
    • Re: NSTreeController: how do I select a model object?
      • From: Charles Srstka <email@hidden>
References: 
 >NSTreeController: how do I select a model object? (From: Jens Alfke <email@hidden>)
 >Re: NSTreeController: how do I select a model object? (From: Michael Babin <email@hidden>)
 >Re: NSTreeController: how do I select a model object? (From: Jens Alfke <email@hidden>)
 >Re: NSTreeController: how do I select a model object? (From: Charles Srstka <email@hidden>)

  • Prev by Date: Re: How test whether Mac app is running in Xcode?
  • Next by Date: Re: How test whether Mac app is running in Xcode?
  • Previous by thread: Re: NSTreeController: how do I select a model object?
  • Next by thread: Re: NSTreeController: how do I select a model object?
  • Index(es):
    • Date
    • Thread