Re: Newbie Question on a method signature
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