Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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



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:
http://lists.apple.com/mailman/options/cocoa-dev/email@hidden

This email sent to 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>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.