Re: Protocol-related compilation warnings
Re: Protocol-related compilation warnings
- Subject: Re: Protocol-related compilation warnings
- From: Ondra Cada <email@hidden>
- Date: Wed, 8 Jun 2005 01:44:45 +0200
Allan,
On 8.6.2005, at 1:15, Hamish Allan wrote:
Sorry, should have mentioned that; yes, it's implemented directly
in AubioDocument, and the code executes correctly which suggests
that this is not a typo problem. I also tried declaring
ioiDataForIOIView directly in the interface definition for
AubioDocument which didn't work either. Neither did changing the
name of the message to foo:. I am perplexed.
Could you perhaps make a smallest example which shows the problem?
The compiler *does* know formal protocols all right, so the catch
would probably be in importing (do you perhaps import *another*
header from IOIView.h? There might be a problem if #import's get
crossed) or whatever: the simpler the example which presents the same
problem, the easier it would be for us (or even for yourself, during
simplifying the code :)) to find the real cause.
The bare bones are all right indeed:
100 /tmp> <q.m
#import <Cocoa/Cocoa.h>
@protocol Foo
-(void)foo;
@end
@interface Bar:NSObject<Foo> @end
void f(void) {
Bar *bar;
[bar foo];
}
101 /tmp> cc -Wall -c q.m
102 /tmp> <q.m
#import <Cocoa/Cocoa.h>
@protocol Foo
-(void)foo;
@end
@interface Bar:NSObject/*<Foo>*/ @end
void f(void) {
Bar *bar;
[bar foo];
}
103 /tmp> cc -Wall -c q.m
q.m: In function 'f':
q.m:8: warning: `Bar' may not respond to `-foo'
q.m:8: warning: (Messages without a matching method signature
q.m:8: warning: will be assumed to return `id' and accept
q.m:8: warning: `...' as arguments.)
104 /tmp>
---
Ondra Čada
OCSoftware: email@hidden http://www.ocs.cz
private email@hidden http://www.ocs.cz/oc
Attachment:
smime.p7s
Description: S/MIME cryptographic signature
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden