• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Color Picker Questions
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Color Picker Questions


  • Subject: Color Picker Questions
  • From: Darrin Cardani <email@hidden>
  • Date: Mon, 29 Dec 2003 11:30:05 -0600

(I apologize if this gets posted twice. It appears that I got unsubscribed from the list without my knowledge.)

I allow the user to select a color using the color picker in my application. However, it's not working the way I (and my users) expect it to. I'm wondering if I'm just using the wrong tool, or if there is any way to get it to do what I want.

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.

The following things happen, and I'd like to change them:

1) When the color panel appears, it does not have the color I set. I call [ colorPanel setColor:myColor ];, yet it doesn't seem to have any effect. Sometimes, it will get the new color the *next time* it's displayed, though not always.

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?

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. Thus, the user cannot change their mind and decide not to pick a new color, as once they touch any control in the color panel, a new color is chosen. This directly violates the UI concept of forgiveness, and given problem 1 above, means that any time they pick a color, it almost always turns to black immediately when the color panel is displayed, since that's what the color panel usually has in it.

Is there something I'm missing about using the color panel in Cocoa? Is there something else I should be using in this case, or some setup I need to do to get the desired behavior?

Thanks,
Darrin
--
Darrin Cardani - email@hidden
President, Buena Software, Inc.
<http://www.buena.com/>
Video, Image and Audio Processing Development
_______________________________________________
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.

  • Follow-Ups:
    • Re: Color Picker Questions
      • From: Chris Hanson <email@hidden>
  • Prev by Date: Solved: Program worked under Xcode 1.0.1, crashes under Xcode 1.1
  • Next by Date: RE: Print 2 pages from customview
  • Previous by thread: Solved: Program worked under Xcode 1.0.1, crashes under Xcode 1.1
  • Next by thread: Re: Color Picker Questions
  • Index(es):
    • Date
    • Thread