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: 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