Re: OBJ-C question
Re: OBJ-C question
- Subject: Re: OBJ-C question
- From: Ondra Cada <email@hidden>
- Date: Sat, 17 Apr 2004 01:57:38 +0200
Mike,
On 17.4.2004, at 1:22, Mike R. Manzano wrote:
>
If I have an informal protocol, and am sending a message conforming to
>
the protocol to an object of type id, is it normal to have warning
>
messages appear during builds?
No. Looks like you didn't give the informal protocol declaration to the
compiler, or there's some other trick (in XCode, it seems often old
versions of headers are used until you clean, sigh!).
Anyway:
10 /tmp> <q.m
#import <Foundation/Foundation.h>
@interface NSString (InformalProtocol)
-(void)fooBar;
@end
void func() {
id o=nil;
[o fooBar];
}
11 /tmp> cc -c -Wall q.m
12 /tmp>
---
Ondra Hada
OCSoftware: email@hidden
http://www.ocs.cz
private email@hidden
http://www.ocs.cz/oc
[demime 0.98b removed an attachment of type application/pkcs7-signature which had a name of smime.p7s]
_______________________________________________
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.