Re: NSColorWell, setColor and bindings
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.