On Aug 13, 2009, at 1:27 PM, Daniel Furrer wrote:
Is "foo" itself nil?


No, foo is fine! =)

Are you sure? I stuck your code in a button's action method and when I click the button foo is nil. I tried both your exact code and the correction Sherm pointed out.

I think David Duncan has the answer:

On Aug 13, 2009, at 12:41 PM, David Duncan wrote:
On Aug 13, 2009, at 9:24 AM, Daniel Furrer wrote:

I'm trying to get the RGB components of a system color.


Which system color? Many system colors are patterns and thus do not have real RGB values.

The doc for +controlColor says:
The system color used for the flat surfaces of a control. By default, the control color is a pattern color that will draw the ruled lines for the window background, which is the same as returned by windowBackgroundColor.

If you use controlColor assuming that it is a solid, you may have an incorrect appearance. You should use lightGrayColor in its place.



--Andy


_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to