NSNumberFormatter: Display INT as decimal
NSNumberFormatter: Display INT as decimal
- Subject: NSNumberFormatter: Display INT as decimal
- From: Steven Hamilton <email@hidden>
- Date: Mon, 3 Nov 2008 19:58:20 +1000
Hi Folks,
Following on from my previous query regarding decimals and floats,
I've decided to refactor my code to maintain a base component of any
currency in use gnucash stylee. This means all values are kept as INT
for accuracy. However, I wish to display the "cent" amounts as dollars
which means banging a decimal point in 2 digits from the right. Can
NSNumberformatter be made to do this? Display an INT value to make it
look like a decimal without actually turning it into an NSDecimal as
such? And also, accept input that looks like a decimal but is stored
as an INT?
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden