• 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: programatically changing values on a bound NSSlider
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: programatically changing values on a bound NSSlider


  • Subject: Re: programatically changing values on a bound NSSlider
  • From: Scott Anguish <email@hidden>
  • Date: Sun, 15 Oct 2006 00:55:06 -0400


On Oct 14, 2006, at 11:12 PM, Martin Redington wrote:

How can I change the value of the other NSSlider programmatically, and have the binding pick it up? I tried playing with didChangeValueForKey:, but that didn't seem to do it for me.

basically, you have to change the value in the model rather than in the UI. (Second item in the troubleshooting doc for Cocoa bindings here http://developer.apple.com/documentation/Cocoa/Conceptual/CocoaBindings/index.html#//apple_ref/doc/uid/10000167i)


the way I'd do it is to bind the range values on the sliders to some controller, and have that controller ensure that the values (in the controller) are in the right range as they change. then the sliders will be updated.


_______________________________________________ Do not post admin requests to the list. They will be ignored. Cocoa-dev mailing list (email@hidden) Help/Unsubscribe/Update your Subscription: This email sent to email@hidden
References: 
 >programatically changing values on a bound NSSlider (From: Martin Redington <email@hidden>)

  • Prev by Date: Re: KVC Problems with Indexed Accessor for To-Many Properties
  • Next by Date: Re: KVC Problems with Indexed Accessor for To-Many Properties
  • Previous by thread: programatically changing values on a bound NSSlider
  • Next by thread: Custom dimmed graphic for NSButton?
  • Index(es):
    • Date
    • Thread