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: Shane Stanley <email@hidden>
- Date: Tue, 15 Oct 2013 09:30:19 +1100
On 15 Oct 2013, at 8:18 AM, Jens Alfke <email@hidden> wrote:
> 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?
I'm using datasources, but that shouldn't matter:
[self.outlineView selectRowIndexes:[NSIndexSet indexSetWithIndex:[self.outlineView rowForItem:item]] byExtendingSelection:NO];
--
Shane Stanley <email@hidden>
'AppleScriptObjC Explored' <www.macosxautomation.com/applescript/apps/>
_______________________________________________
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