• 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
Can't get the formatted number of NSTextfield
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Can't get the formatted number of NSTextfield


  • Subject: Can't get the formatted number of NSTextfield
  • From: Gustavo Pizano <email@hidden>
  • Date: Mon, 17 May 2010 14:15:52 +0200


Hello all.

I have a little problem here.

I need to get the value of a textfiled which has a NSNumberFormatter with currency style.

Now, Im doing:

			double d = [amountPayedTF doubleValue];
		NSDecimalNumber * dm = (NSDecimalNumber *)[NSDecimalNumber numberWithDouble:d];
		..

so then I can compare the decimals number with the entitie's attributes.

BUT, on d, Im always getting just the thousand digit (the first one) when inputing for example 2664, when formatted it becomes 2.664.00 €, so Im geting only 2, if I put 264 --> 264.00 € I get the 264, and if I put 264.15 -> 264.15 € I get 264.15 in d...

What am I doing wrong ?

thanks tons.

Gustavo


_______________________________________________

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

  • Follow-Ups:
    • Re: Can't get the formatted number of NSTextfield
      • From: Fritz Anderson <email@hidden>
  • Prev by Date: Re: UI blocking
  • Next by Date: Re: UI blocking
  • Previous by thread: Re: TIPS : Using Add2Project to organize your projects more effectively.
  • Next by thread: Re: Can't get the formatted number of NSTextfield
  • Index(es):
    • Date
    • Thread