• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
AnyObject and protocols
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


  • Follow-Ups:
    • Re: AnyObject and protocols
      • From: Quincey Morris <email@hidden>
  • Prev by Date: Re: Programmatically switching text fields
  • Next by Date: Re: AnyObject and protocols
  • Previous by thread: Re: 64-bit only iOS
  • Next by thread: Re: AnyObject and protocols
  • Index(es):
    • Date
    • Thread