• 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
NSColorWell, changeColor: and first responder
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

NSColorWell, changeColor: and first responder


  • Subject: NSColorWell, changeColor: and first responder
  • From: Drew McCormack <email@hidden>
  • Date: Mon, 11 Aug 2003 20:38:15 +0200

I have a window with a NSColorWell and a NSTextView, which are basically unrelated. I want to use the color well to set a color in my model object. This works fine.

Problem is, if I click the well, I get a NSColorPanel, and if I leave this open and then start editing the NSTextView, the text changes color based on the selected color in the NSColorPanel.

It seems NSColorPanel sends a changeColor: message to the first responder when a color is selected. This is not the behavior I want though, in this case.

What is the best way to prevent this? Can I make the NSTextView not display colors? Can I get the NSColorPanel not to send the message? Is there an elegant solution short of an ugly subclass?

Drew

----------------------------------
Dr. Drew McCormack
Trade Strategist (www.trade-strategist.com)
Stock Market strategy design platform for Mac OS X.
_______________________________________________
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: NSColorWell, changeColor: and first responder
      • From: Douglas Davidson <email@hidden>
  • Prev by Date: Re: Text storage
  • Next by Date: Re: Setting focus to text field in drawer
  • Previous by thread: Re: Text storage
  • Next by thread: Re: NSColorWell, changeColor: and first responder
  • Index(es):
    • Date
    • Thread