Type id <Protocol1> does not match id <Protocol2> - but it does!
Well, I have two protocols in the same header file, let them call them Protocol1 and Protocol2. I have a main application controller that matches both protocols and a subclass of NSWindowController that has the following member:
id <Protocol1, Protocol2> delegate;
I get a warning at the end of the implementation of the NSWindowController subclass that "type id does not match protocol2". But, as shown, the delegate must comply with both protocols that it does.
In addition, the application works fine. Is there any other way to do this? I suppose I could just collapse the two protocols together, but that would damage the modularity of the program.
EDIT:
Here are two protocols. Since this is more of a testing scenario, they are short.
@protocol TPTBController <NSObject>
-(void)sendGrowlMessage:(NSString *)message title:(NSString *)title;
@end
@protocol AddPower <NSObject>
-(void)addPower:(NSArray *)array;
-(void)setCanAddPower:(BOOL)can;
@end