Creating a Color Meter Using Cocoa
Subject:   Color wheel...
Date:   2001-06-22 09:17:54
From:   donarb
Response to: Color wheel...

Why all that code? You already have methods that set the sliders and text fields, so just call those:

- (IBAction)colorWellAction:(id)sender
NSColor *aColor = [sender color];

/* send messages to each color setting routine */
[self setRed:[NSNumber numberWithFloat:[aColor redComponent]]];
[self setBlue:[NSNumber numberWithFloat:[aColor blueComponent]]];
[self setGreen:[NSNumber numberWithFloat:[aColor greenComponent]]];
// [self setAlpha:[NSNumber numberWithFloat:[aColor alphaComponent]]];