Re: Protocol doesn't seem to compile? (SOLVED)
Re: Protocol doesn't seem to compile? (SOLVED)
- Subject: Re: Protocol doesn't seem to compile? (SOLVED)
- From: Sherm Pendley <email@hidden>
- Date: Fri, 27 Feb 2004 11:45:36 -0500
On Feb 27, 2004, at 11:31 AM, Jason Vowell wrote:
That is very helpful. I can just declare them in a .h file and include
the
in an empty .m file and even take the opportunity to test them in the
.m
file if need be (as suggested previously).
It's more than just simple syntax-checking - much more.
Presumably, since you're using formally-declared protocols, your code
will need to interface with objects that implements those protocols.
You'll need to include the protocol definition in your code then, in
order to test those objects with -conformsToProtocol:.
Also, when you're dealing with objects whose class you don't know, but
you expect to implement your protocol, you can declare them as
id<ProtocolName> to avoid compiler warnings about unknown methods.
sherm--
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.