Re: Limiting a float
Re: Limiting a float
- Subject: Re: Limiting a float
- From: Justin Anderson <email@hidden>
- Date: Wed, 27 Aug 2003 19:24:21 -0400
In InterfaceBuilder, drop an NSFormatter onto that NSTextField. It's in
the same palette as the NSTextField was. You'll be wanting the $ one.
Its default settings limit numbers to 2 decimal places. NSFormatters
are really useful.
Justin
On Wednesday, August 27, 2003, at 07:05 PM, Emig 647 wrote:
I am beginning cocoa ... Again.
For my first app I made a conversion between Kelvin, Celsius,
Fahrenheit.
I send the result to an NSTextField as a float...
The problem is the float is sent as 17.340209972309 and I want to
limit it
to 2 places to the right of the decimal...
Any ideas?
- Cody
_______________________________________________
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.
_______________________________________________
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.