Re: AnyObject and protocols

2015-08-05 Thread Charles Srstka
I’m just on fire today, aren’t I? Posted this on the wrong thread. Sorry for the noise. Charles > On Aug 5, 2015, at 7:17 PM, Charles Srstka wrote: > >> On Aug 4, 2015, at 6:23 PM, Rick Mann wrote: >> >>> On Aug 4, 2015, at 16:22 , Quincey Morris >>> wrote: >>> >>> On Aug 4, 2015, at 15:5

Re: AnyObject and protocols

2015-08-05 Thread Charles Srstka
> On Aug 4, 2015, at 6:23 PM, Rick Mann wrote: > >> On Aug 4, 2015, at 16:22 , Quincey Morris >> wrote: >> >> On Aug 4, 2015, at 15:58 , Rick Mann wrote: >>> >>> I'm curious why, and what the right approach might be? >> >> As to why, the problem is that instances of a type conforming to a p

Re: AnyObject and protocols

2015-08-04 Thread Rick Mann
> On Aug 4, 2015, at 16:22 , Quincey Morris > wrote: > > On Aug 4, 2015, at 15:58 , Rick Mann wrote: >> >> I'm curious why, and what the right approach might be? > > As to why, the problem is that instances of a type conforming to a protocol > aren’t necessarily objects. If you want them to

Re: AnyObject and protocols

2015-08-04 Thread Quincey Morris
On Aug 4, 2015, at 15:58 , Rick Mann wrote: > > I'm curious why, and what the right approach might be? As to why, the problem is that instances of a type conforming to a protocol aren’t necessarily objects. If you want them to be, try declaring your protocol like this: protocol P: cla

AnyObject and protocols

2015-08-04 Thread Rick Mann
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