method confusion
method confusion
- Subject: method confusion
- From: Hans van der Meer <email@hidden>
- Date: Mon, 17 Sep 2007 23:22:46 +0200
In my code I have in a testcase:
@interface HMCharacterAlphabetTest : SenTestCase {
...
Inside one of the tests:
HMCharacterAlphabet *alphabet = [[HMCharacterAlphabet alloc]
initWithSize: 3];
defined in class HMCharacterAlphabet as:
- (id) initWithSize: (unsigned) size; // class in HMCharacterAlphabet.h
Somehow arises confusion with the identically typed init in NSImage.h:
- (id)initWithSize:(NSSize)aSize;
Compiling gives:
warning: multiple methods named -initWithSize
error: incompatible type for argument 1 of initWithSize
warning: using -(id)initWithSize:(NSSize)aSize (NSImage.h:65)
I fail to see why this is possible, as these declarations are in
different classes.
Presumably it is some silly mistake. Can someone point me in the
right direction?
Hans van der Meer
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden