This is driving me mad!
I have a class called RQiTunesItem with three init methods:
The first two methods work fine, but if I add a call to the third one and compile I get a warning from Xcode which says "warning: passing argument 1 of 'initWithAttributes:' from incompatible pointer type".
Here's an example of the call:
If I go ahead and run the app it seems to work absolutely fine. initWithAttributes: does get called, and the object is initialised as it should be.
The really odd thing is that if I change the name of this method, for example calling it initWithFunkyAttributes:, the warning goes away. This leads me to believe that there is some kind of naming conflict going on between this method and the longer but similarly named initWithAttributes:appleScriptObject:error:. But how could this be??
Any help from programmers or psychiatrists much appreciated.
I have a class called RQiTunesItem with three init methods:
Code:
- (id)initWithAttributes:(NSDictionary *)attributes appleScriptObject:(MBAppleScriptObject *)appleScriptObject error:(NSError **)outError; // Designated initialiser
- (id)initWithAppleScriptObject:(MBAppleScriptObject *)appleScriptObject error:(NSError **)outError;
- (id)initWithAttributes:(NSDictionary *)attributes;
The first two methods work fine, but if I add a call to the third one and compile I get a warning from Xcode which says "warning: passing argument 1 of 'initWithAttributes:' from incompatible pointer type".
Here's an example of the call:
Code:
RQiTunesItem *item = [[RQiTunesItem alloc] initWithAttributes:[NSDictionary dictionary]];
If I go ahead and run the app it seems to work absolutely fine. initWithAttributes: does get called, and the object is initialised as it should be.
The really odd thing is that if I change the name of this method, for example calling it initWithFunkyAttributes:, the warning goes away. This leads me to believe that there is some kind of naming conflict going on between this method and the longer but similarly named initWithAttributes:appleScriptObject:error:. But how could this be??
Any help from programmers or psychiatrists much appreciated.