AnyObject and protocols
AnyObject and protocols
- Subject: AnyObject and protocols
- From: Rick Mann <email@hidden>
- Date: Tue, 04 Aug 2015 15:58:47 -0700
I was hoping to use a protocol to define the objects I could put into an NSOutlineView. Unfortunately, NSOutlineView has datasource methods that return AnyObject, and I can't seem to return a variable of my protocol type as an AnyObject.
I'm curious why, and what the right approach might be? If I have an instance of MyProtocol, is there any way to pass it to something that wants an AnyObject?
TIA,
--
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