Re: Strange XCode Warning

2015-09-17 Thread Dave
Hi, Thinking about this some more I’m wondering if my Protocol definition for the Class can/should also contain instance methods, e.g. @protocol ProtocolX @required +(void) someClassMethod; -(void) someInstanceMethod; @end Or do I need two protocol definitions, one for the Class and one for

Re: Strange XCode Warning

2015-09-15 Thread Jens Alfke
> On Sep 15, 2015, at 10:52 AM, Kyle Sluder wrote: > > Class really is a Class (instance of metaclass). That seems to be true, based on a bit of testing I just did. But I don’t think a type like that makes sense, since it says that the metaclass implements the protocol,

Re: Strange XCode Warning

2015-09-15 Thread Jens Alfke
> On Sep 15, 2015, at 8:36 AM, Dave wrote: > > Class That declaration doesn’t make sense, because the class Class (i.e. a metaclass) can’t conform to a protocol. I think that’s the source of the strange warning; the compiler is sort of confused about whether that

Re: Strange XCode Warning

2015-09-15 Thread Dave
> On 15 Sep 2015, at 16:45, Jens Alfke wrote: > > >> On Sep 15, 2015, at 8:36 AM, Dave > > wrote: >> >> Class > > That declaration doesn’t make sense, because the class Class (i.e. a > metaclass) can’t conform to

Re: Strange XCode Warning

2015-09-15 Thread Dave
This fixes it: if ([(Class)theDetailViewClass conformsToProtocol:@protocol(LTWDetailViewProtocol)] == NO) Although I’m not sure if what I am doing is allowable in Objective-C and I’ve just been getting away with it? I’ll have a look in the reference doc and see if it say anything about this.

Re: Strange XCode Warning

2015-09-15 Thread Jens Alfke
> On Sep 15, 2015, at 9:19 AM, Dave wrote: > > Class was allowable and would cause the compiler to generate a > warning if “MyClass” does not conform to “ProtocolX”, e.g. I’ve never seen that used before … which doesn’t prove it isn’t real, but I’m suspicious. Have

Re: Strange XCode Warning

2015-09-15 Thread Dave
> On 15 Sep 2015, at 18:23, Jens Alfke wrote: > > >> On Sep 15, 2015, at 9:19 AM, Dave > > wrote: >> >> Class was allowable and would cause the compiler to generate a >> warning if “MyClass” does not conform to

Re: Strange XCode Warning

2015-09-15 Thread Dave
> > See the type for the argument to +appearanceWhenContainedIn:. It's a > Class. Not an explicit mention of metaclasses, > but at least proof that we use the Class syntax to refer to > classes, not instances. > > --Kyle Sluder But should the compiler warn if you pass a Class that doesn’t

Re: Strange XCode Warning

2015-09-15 Thread Kyle Sluder
On Tue, Sep 15, 2015, at 01:23 PM, Jens Alfke wrote: > > > On Sep 15, 2015, at 10:52 AM, Kyle Sluder wrote: > > > > Class really is a Class (instance of metaclass). > > That seems to be true, based on a bit of testing I just did. But I don’t > think a type like that makes