Re: Color Picker Questions
Re: Color Picker Questions
- Subject: Re: Color Picker Questions
- From: Chris Hanson <email@hidden>
- Date: Mon, 29 Dec 2003 13:49:23 -0600
On Dec 29, 2003, at 11:30 AM, Darrin Cardani wrote:
When the user clicks on a color well, I get the shared NSColorPanel
instance, set the color to the current color of the color well, set up
the picker's target and action, then display it.
I'm not sure what the exact problem is, but it sounds here like you
might be doing too much work. An NSColorWell will send its action when
the user changes the color in the well, and will manage all of the
interactions with the shared NSColorPanel for you.
So all you should have to do is assign each color initially to an
NSColorWell, and then take a new color from that NSColorWell when it
sends its action.
2) The color panel only shows the new color, and not the old color. It
is often necessary for the user to compare the currently selected
color with the new one they are choosing. Is there any way to do this?
Unfortunately I don't there's a standard way to do so. You could
probably do it pretty easily by adding an accessory view to the color
panel. However, then you'd need to manage the color panel on your own
again.
3) There is no way for the user to cancel their selection. The color
panel has no cancel button, and it calls the action procedure whenever
the user lets up on a control in the UI.
Your best bet here is probably to make changing a color undoable. With
panels like the color panel and the font panel, Apple seems to be
leaning more towards more direct manipulation than modal choice in
their interface metaphor.
-- Chris
--
Chris Hanson <email@hidden>
bDistributed.com, Inc.
Outsourcing Vendor Evaluation
Custom Mac OS X Development
Cocoa Developer Training
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.