Re: Slider value display
Re: Slider value display
- Subject: Re: Slider value display
- From: Denis Queffeulou <email@hidden>
- Date: Fri, 16 Apr 2004 18:40:34 +0200
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.