• 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
Re: Newbie Question on a method signature
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Newbie Question on a method signature


  • Subject: Re: Newbie Question on a method signature
  • From: Bill Bumgarner <email@hidden>
  • Date: Wed, 04 Jun 2008 13:21:37 -0700

Class names changed to not perpetuate NDA violation...

On Jun 4, 2008, at 1:14 PM, James Cicenia wrote:
I have the following:

((ProjectListCell *)cell).budgetHealth.textColor = [self returnNSColorForFont:s];

And here is my method:

- (NSColor *) returnNSColorForFont:(NSString *) theString{
	if([theString compare:@"1"] == NSOrderedSame){
		return [NSColor greenColor];
	}else if([theString compare:@"0"] == NSOrderedSame){
		return [NSColor yellowColor];
	}else if([theString compare:@"-1"] == NSOrderedSame){
		return [NSColor redColor];
	}else{
		return [NSColor grayColor];
	}
}

why does it tell me:

warning: (Messages without a matching method signature will be assumed to return 'id' and accept...

Where do you declare -returnNSColorForFont:?

Have you #imported the header that declares it into the implementation file that contains the line of code that warns?

b.bum
_______________________________________________

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


References: 
 >Newbie Question on a method signature (From: James Cicenia <email@hidden>)

  • Prev by Date: Re: Newbie Question on a method signature
  • Next by Date: Re: Newbie Question on a method signature
  • Previous by thread: Re: Newbie Question on a method signature
  • Next by thread: Re: Newbie Question on a method signature
  • Index(es):
    • Date
    • Thread