Re: Multiple sliders updating the same text field
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