Re: [newbie]: UI questions (using NSSlider & NSTextField with delegation)
Re: [newbie]: UI questions (using NSSlider & NSTextField with delegation)
- Subject: Re: [newbie]: UI questions (using NSSlider & NSTextField with delegation)
- From: Martin Weil <email@hidden>
- Date: Mon, 12 Aug 2002 22:07:12 +0200
Hello
I have a simple question about using an NSSlider to populate an
NSTextField
(I checked the list archives first, though). I am able to have the
NSTextField updated by taking an intValue from the NSSlider. This works
fine. I have my controller object set up as the delegate object for the
NSTextField (it implements the controlTextDidChange method), but the
controller object only seems to be notified when I actually go in and
modify the NSTextField manually (not when it's changed via the
slider). My
question is how can I get the NSSlider to update the text field and have
that value be sent to the controller as well? I'm sure I'm just missing
something simple. Thanks.
Correct me if I understood you wrong:
You want to update the NSTextField every time the NSSlider Value is
changed?
Nothing simpler than that, for now you have implemented the NSSlider as
an Outlet, right?
You just have to implement it as an Action too, just like a Button. This
action method will then be called every time you change the Slider.
Hope that helps!
Regards,
Martin
--
http://www.mweil.net
_______________________________________________
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.