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:26:31 -0700
> On May 24, 2016, at 19:34 , Quincey Morris <email@hidden> wrote:
>
> On May 24, 2016, at 18:01 , Rick Mann <email@hidden> wrote:
>>
>> That's what I tried, but .selection is always _NSControllerObjectProxy, and the resulting conditional cast never triggers.
>
> Urg. You could assigning treeController.selection.self to an AnyObject variable, and see if that retrieves the object it’s a proxy for.
>
> Or, forget treeController.selection, but use 'treeController.selectedObjects.first as? MyClass' instead. That one isn’t a proxy.
>
Eh, I think I'll just use my current workaround using NSOutlineView methods.
--
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