Re: NSTreeController selection and Swift
Re: NSTreeController selection and Swift
- Subject: Re: NSTreeController selection and Swift
- From: Quincey Morris <email@hidden>
- Date: Tue, 24 May 2016 19:34:00 -0700
- Feedback-id: 167118m:167118agrif8a:167118sOkHm53Z1y:SMTPCORP
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.
_______________________________________________
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