• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
method confusion
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


  • Follow-Ups:
    • Re: method confusion
      • From: Ricky Sharp <email@hidden>
    • Re: method confusion
      • From: Charles Steinman <email@hidden>
    • Re: method confusion
      • From: "Shawn Erickson" <email@hidden>
  • Prev by Date: Re: Incremental Development?
  • Next by Date: Re: CoreData Indexing is it possible?
  • Previous by thread: Re: CURL and Connection limits
  • Next by thread: Re: method confusion
  • Index(es):
    • Date
    • Thread