RE: Protocol doesn't seem to compile?
RE: Protocol doesn't seem to compile?
- Subject: RE: Protocol doesn't seem to compile?
- From: "Jason Vowell" <email@hidden>
- Date: Fri, 27 Feb 2004 09:01:14 -0600
I don't particularly appreciate your asinine attitude, but perhaps you have
answered my question.
I posted this a week ago (and got only one response) and that's really what
I was looking for in an answer.. because if you were to declare your code
that is below in a .h file it would be ignored by the compiler..(at least
that's the behavior in Xcode 1.1.1) perhaps if it is in a .m file it is
not.. and that is what I would like to know.. is declaring @protocol in .m
files the thing to do?
Thank you,
Jason
-----Original Message-----
From: Ondra Cada [
mailto:email@hidden]
Sent: Friday, February 27, 2004 8:50 AM
To: Jason Vowell
Cc: email@hidden
Subject: Re: Protocol doesn't seem to compile?
On Friday, Feb 27, 2004, at 15:32 Europe/Prague, Jason Vowell wrote:
>
Yes of course it is checked if referenced by an implementing class,
>
per my
>
post
>
>
>
"If I make a syntax mistake
>
the compiler ignores it, unless of course the protocol is
>
referenced by an implementing class."
>
>
And of course the apple documentation says this as well
>
>
But that isn't the point... the point is that they aren't check if not
>
referenced
Wrong, too:
61 /tmp> >ptest.m
#import <Foundation/Foundation.h>
@protocol Test
-(int)foo;
-bar:(uh oh)o; // this is a syntax error, of course
@end
62 /tmp> cc -framework Foundation ptest.m
ptest.m:4: undefined type, found `uh'
ptest.m:4: illegal keyword selector, missing `)' after `uh'
cpp-precomp: warning: errors during smart preprocessing, retrying in
basic mode
ptest.m:4: parse error before "uh"
63 /tmp>
---
Ondra Hada
OCSoftware: email@hidden
http://www.ocs.cz
private email@hidden
http://www.ocs.cz/oc
_______________________________________________
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.