• 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: [newbie]: UI questions (using NSSlider & NSTextField with delegation)
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [newbie]: UI questions (using NSSlider & NSTextField with delegation)


  • Subject: Re: [newbie]: UI questions (using NSSlider & NSTextField with delegation)
  • From: email@hidden
  • Date: Tue, 13 Aug 2002 07:21:46 -0400

Thanks for the reply Martin, but I do have the slider & textfield hooked up
through an outlet/action. This part works ok, i.e. I am able to have the
textfield updated from the slider. It's just that even though the
textfield has it's value updated from the slider, this value isn't sent to
the textfield's delegate (my controller object in this case) unless I go in
and manually hit return in the textfield or manually edit the text. Only
then does the controller object get the update through delegation.

Shayne White
Software Developer


Global Structured Products Group
SSgA Boston
email@hidden
617.664.6032 (phone)
617.664.4449 (fax)


|---------+---------------------------->
| | Martin Weil |
| | <email@hidden|
| | > |
| | |
| | 08/12/02 04:07 PM|
| | |
|---------+---------------------------->
>--------------------------------------------------------------------------------------------------------------|
| |
| To: email@hidden |
| cc: email@hidden |
| Subject: Re: [newbie]: UI questions (using NSSlider & NSTextField with delegation) |
>--------------------------------------------------------------------------------------------------------------|





> 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.

  • Follow-Ups:
    • Re: [newbie]: UI questions (using NSSlider & NSTextField with delegation)
      • From: "Clark S. Cox III" <email@hidden>
  • Prev by Date: [TRTFM] Cocoa and AppleScript
  • Next by Date: Re: [TRTFM] Cocoa and AppleScript
  • Previous by thread: Re: [newbie]: UI questions (using NSSlider & NSTextField with delegation)
  • Next by thread: Re: [newbie]: UI questions (using NSSlider & NSTextField with delegation)
  • Index(es):
    • Date
    • Thread