Re: Trouble with NSColor
Re: Trouble with NSColor
- Subject: Re: Trouble with NSColor
- From: Alastair Houghton <email@hidden>
- Date: Thu, 13 Aug 2009 17:35:33 +0100
On 13 Aug 2009, at 17:24, Daniel Furrer wrote:
I'm trying to get the RGB components of a system color. Here's what
I've
been trying:
NSColor* foo = [[NSColor controlColor] colorUsingColorSpaceName:
@"NSCalibratedRGBColorSpace"];
NSLog(@"%f, %f, %f", [foo redComponent], [foo blueComponent], [foo
greenComponent]);
but all I ever get is 0.0, 0.0, 0.0
Also [foo numberOfComponents] seems to be 0. (For [NSColor
blueColor] it's
working fine however).
What am I doing wrong?
Is "foo" itself nil?
Kind regards,
Alastair.
--
http://alastairs-place.net
_______________________________________________
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