• 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: Multiple sliders updating the same text field
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Multiple sliders updating the same text field


  • Subject: Re: Multiple sliders updating the same text field
  • From: Stephane Sudre <email@hidden>
  • Date: Tue, 24 Jul 2007 18:17:16 +0200


On 24 juil. 07, at 17:49, Mike Abdullah wrote:

Personally I'd suggest using Cocoa bindings for this. Bind each slider to its own property in the model. Then, add a fourth property to the model which returns the combined value of the other three properties. Bind the text field to this.

Mike.

On 24 Jul 2007, at 16:21, Nathaniel Gottlieb-Graham wrote:

Here's my situation: I have a couple of sliders that both need to update the same text field. The sliders all send values from -2 to 2, only stopping on integer values (-2, -1, 0, 1, 2). The text field is supposed to display the combined total of these sliders, so if one is at -2 and another is at 2, it should display 0. For some reason, I'm having a lot of trouble with this. Here's the code for one slider:

I'm wondering if it might not be possible to use a distributed objects solution with 2 threads to do this...


Another way to say I.S.'s solution sounds really easier and better. The Cocoa bindings path seems overkill in this particular case.

_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


  • Follow-Ups:
    • Re: Multiple sliders updating the same text field
      • From: "I. Savant" <email@hidden>
References: 
 >Multiple sliders updating the same text field (From: Nathaniel Gottlieb-Graham <email@hidden>)
 >Re: Multiple sliders updating the same text field (From: Mike Abdullah <email@hidden>)

  • Prev by Date: Re: How to get custom widgets into nib file window ?
  • Next by Date: Re: NSLog preventing a crash?
  • Previous by thread: Re: Multiple sliders updating the same text field
  • Next by thread: Re: Multiple sliders updating the same text field
  • Index(es):
    • Date
    • Thread