• 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
Re: NSColorWell, setColor and bindings
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: NSColorWell, setColor and bindings


  • Subject: Re: NSColorWell, setColor and bindings
  • From: Steve Sims <email@hidden>
  • Date: Tue, 22 Jun 2004 11:05:40 -0400

On 22 Jun 2004, at 06:27, Dominique PERETTI wrote:

Hi,

I have a NSColorWell bound in Interface Builder to some values that works properly.
For some reason, I need to invoke this colorwell's setColor: programmatically.

The color changes... but bound observers are not notified !

What am I missing ?

From what you said above it sounds like you're calling setColor directly on the NSColorWell object in your UI. That's not the way to do it...

What you need to do is set the colour value within your data model using setValue: forKey:. The UI's colour should update itself in response to that, as well as all other bound observers.

If you just set values in the UI then you're actually bypassing the bindings system and your underlying model won't get updated.

Steve
_______________________________________________
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, setColor and bindings
      • From: Dominique PERETTI <email@hidden>
References: 
 >NSColorWell, setColor and bindings (From: Dominique PERETTI <email@hidden>)

  • Prev by Date: Re: Making an NSBorderlessWindowMask window act 'normal'
  • Next by Date: Re: NSColorWell, setColor and bindings
  • Previous by thread: NSColorWell, setColor and bindings
  • Next by thread: Re: NSColorWell, setColor and bindings
  • Index(es):
    • Date
    • Thread