Re: NSColor may not respond to colorWithCalibratedRed
Re: NSColor may not respond to colorWithCalibratedRed
- Subject: Re: NSColor may not respond to colorWithCalibratedRed
- From: "email@hidden" <email@hidden>
- Date: Sat, 27 Dec 2008 15:09:12 +0000
On 27 Dec 2008, at 14:54, Joseph Ayers wrote:
I'm trying to create a dark green color.
In
NSColor * darkGreenColor;
darkGreenColor = [[NSColor alloc] init];
[[darkGreenColor colorWithCalibratedRed:5.0 green:150.0 blue:15.0
alpha:0.5] set];
I get a compile warning
'NSColor' may not respond to 'colorWithCalibratedColorRed....'
The method you are calling is a class method, not an instance method.
+ (NSColor *)colorWithCalibratedRed:(CGFloat)red green:(CGFloat)green
blue:(CGFloat)blue alpha:(CGFloat)alpha
try
darkGreenColor = [NSColor colorWithCalibratedRed:5.0 green:150.0 blue:
15.0 alpha:0.5];
What's wrong here?
Thanks,
Joseph Ayers, Professor
Department of Biology and
Marine Science Center
Northeastern University
East Point, Nahant, MA 01908
Phone (781) 581-7370 x309(office), x335(lab)
Boston: 444 Richards Hall (617) 373-4044
Cellular (617) 755-7523, FAX: (781) 581-6076
eMail: email@hidden
http://www.neurotechnology.neu.edu/
_______________________________________________
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
Jonathan Mitchell
Central Conscious Unit
http://www.mugginsoft.com
_______________________________________________
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