On 15 Oct 2013, at 8:18 AM, Jens Alfke <[email protected]> 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 protected]>
'AppleScriptObjC Explored' <www.macosxautomation.com/applescript/apps/>


_______________________________________________

Cocoa-dev mailing list ([email protected])

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:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to [email protected]

Reply via email to