• 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: Rounding the output value while the slider is being moved
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Rounding the output value while the slider is being moved


  • Subject: Re: Rounding the output value while the slider is being moved
  • From: Hank Heijink <email@hidden>
  • Date: Fri, 29 Sep 2006 10:19:47 -0400

Whoops, forgot to include the list in the previous reply. Sorry about that.

On Sep 29, 2006, at 10:08 AM, Artemiy Pavlov wrote:

I would just put a number formatter on your textfield.

Uhm, I am not sure how I'd do that - is it in the docs for NSTextField?

It's in interface builder, text palette, lower left corner. The one with the dollar sign. Just drop it on the text field and check out the properties in the inspector.


Personally I would use bindings for a case like this -- it saves you from having to manually update the textfield when the slider is moved and vice versa.

Yes I know, but how would I go about to round the value then?

I thought the rounding was just for visual presentation -- the formatter takes care of that. If you need to round the value anyway, round the value in your setter method or when you actually use the value.


Hank Heijink
www.hankheijink.com
email@hidden

_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


  • Follow-Ups:
    • Re: Rounding the output value while the slider is being moved
      • From: "I. Savant" <email@hidden>
References: 
 >Rounding the output value while the slider is being moved (From: Artemiy Pavlov <email@hidden>)
 >Re: Rounding the output value while the slider is being moved (From: Artemiy Pavlov <email@hidden>)

  • Prev by Date: Re: Rounding the output value while the slider is being moved
  • Next by Date: Re: detachDrawingThread:toTarget:withObject: vs detachNewThreadSelector:toTarget:withObject:
  • Previous by thread: Re: Rounding the output value while the slider is being moved
  • Next by thread: Re: Rounding the output value while the slider is being moved
  • Index(es):
    • Date
    • Thread