Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: NSColorWell shows no color



On Dec 27, 2008, at 02:13, tobias assmann wrote:

I use some NSColorWell objects in a preference section of my view. User can chosse so me colors there. All works fine exept one thing. The NSColorWell objects are initialized with default values out of a NSColorList when the UI is opened. But the NSColorWell objects show the color white. When a NSColorWell is clicked the color that is supposed to be selected shows up in the NSColorWell and the default selctor as well. It would be nice to see the color, without the need to click NSColorWell. I have really no idea what my be wrong. This is the code, which I use in the draw method of the view containing the NSColorWells:

// Fill the colorWells
[uiBgColorWell setColor:[topv..colors colorWithKey:@"bg"]];
[uiBlinkColorWell setColor:[topv.colors colorWithKey:@"blink"]];
[uiActivBeatColorWell setColor:[topv.colors colorWithKey:@"activeBeat"]];
[uiInactiveBeatColorWell setColor:[topv.colors colorWithKey:@"inactiveBeat"]];


In the draw method of a view? As in drawRect? That seems like the wrong place to do this.

If you're initializing the colors when the view first appears, then the view's awakeFromNib method would be the usual place to do it. It doesn't seem like you'd want to do this more than once anyway.


_______________________________________________

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:
http://lists.apple.com/mailman/options/cocoa-dev/email@hidden

This email sent to email@hidden
References: 
 >NSColorWell shows no color (From: tobias assmann <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.