Re: Slider value display
Re: Slider value display
- Subject: Re: Slider value display
- From: Fritz Anderson <email@hidden>
- Date: Fri, 16 Apr 2004 17:00:01 -0500
That's not quite what I meant. I had understood you to say that you
were using an NSObjectController (or similar), which controlled a model
property that you had bound to the slider. I was suggesting that you
also bind that property to the text field. That way the text field and
the slider will always be synchronized and correct.
-- F
On 16 Apr 2004, at 11:40 AM, Denis Queffeulou wrote:
Thanks for reply,
I'm newbie with Cocoa and I have to read carefully,
in fact I have no value object to bind with because the controller has
the NSSlider reference only and I'm using the action to tell the
model to change.
What you say is to bind graphical objet directly to the model objet
with IB ?
I have to think about it.
--
Denis
I just made the experiment (admittedly in IB only) of setting up an
NSSlider and an NSTextField. I bound the slider's value to a value in
an NSObjectController, and set its action to send takeIntValueFrom:
to the text field. To round out the trick you specify, I'd have to
initially fill the text field with the value of the slider, and take
it on faith the initialization of the model object won't lead it
astray (since the terms of the puzzle won't let me initialize the
field programmatically).
But this is only a trick. If you're using controller bindings, why
not bind the text field to the value in question, and be done with
it? It's designed to be a to-many relationship.
-- F
On 16 Apr 2004, at 2:59 AM, Denis Queffeulou wrote:
I'm using NSSlider to change some parameter, and I wonder if it is
possible to display the intValue in a NSTextField without doing some
coding and without declaring a member for the NSTextField.
In fact I have a binding between the slider and a controller class,
and since I do that, I cannot see the "takeIntValueFromAction", I
can see only the controller actions.
any idea ?
--
Fritz Anderson
Consulting Programmer
http://resume.manoverboard.org/
_______________________________________________
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.
_______________________________________________
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.