• 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: Sean McBride <email@hidden>
  • Date: Tue, 15 Oct 2013 13:08:25 -0400
  • Organization: Rogue Research Inc.

On Mon, 14 Oct 2013 14:18:19 -0700, Jens Alfke said:

>Hey, Rick’s tree controller question reminded me that I’ve got one I’ve
>been meaning to ask:
>
>With an NSOutlineView driven by an NSTreeController, I’m having trouble
>figuring out how to programmatically select an item: given one of my
>model objects, how do I tell the controller or view to select it?

Yeah, that's always annoyed me too.  I have a subclass that allows me to do it, and in the comments I noted:

"NSTreeController, unlike NSArrayController, does not have a method to select a given model object, it can only select by indexpath. (At WWDC09, I was told the reason for this is that it is hard to implement in the general case in a performant way.)"

Cheers,

--
____________________________________________________________
Sean McBride, B. Eng                 email@hidden
Rogue Research                        www.rogue-research.com
Mac Software Developer              Montréal, Québec, Canada

_______________________________________________

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


References: 
 >NSTreeController: how do I select a model object? (From: Jens Alfke <email@hidden>)

  • Prev by Date: Re: NSTreeController: how do I select a model object?
  • 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