Re: NSTreeController selection and Swift
Re: NSTreeController selection and Swift
- Subject: Re: NSTreeController selection and Swift
- From: Rick Mann <email@hidden>
- Date: Tue, 24 May 2016 23:19:40 -0700
> On May 24, 2016, at 21:24 , Jerry Krinock <email@hidden> wrote:
>
> This may not work even if you work through the Swift issues.
>
> In Objective-C, the selection, selection indexes, and selected objects are all *not* observeable as documented in NSArrayController. See Apple Bug 7827354, closed as duplicate of 3404770.
>
> Assuming that NSTreeController is somehow based on NSArrayController, you’ll likely run into the same issue. I've worked around it in NSArrayController by overriding selection setters :(
Interesting. I didn't notice that, and I do, in fact, get KVO calls when the selection changes. I just don't know how to get at the underlying selected objects.
I'm currently using the NSOutlineView's methods for getting at it as a workaround.
--
Rick Mann
email@hidden
_______________________________________________
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