Re: NSTextField selectText behaviour (Currency Converter Tut)
Re: NSTextField selectText behaviour (Currency Converter Tut)
- Subject: Re: NSTextField selectText behaviour (Currency Converter Tut)
- From: Scott Anguish <email@hidden>
- Date: Fri, 17 Jan 2003 01:51:49 -0500
On Friday, January 17, 2003, at 01:31 AM, Erika wrote:
Another problem with the app which you might have noticed, not being
American, is that it's more conceptually oriented towards converting
USD to other currencies from the point of view of someone living in
the USA, and because exchange rates are given down here on the news
with reference to USD (and a few other major currencies), the
conversion works the other way around when you're not using USD
yourself. I ended up multiplying the amount by 100 an then dividing by
the rate so that I could just enter the number of US cents or UK pence
one of our dollars will buy, and it's much easier to use intuitively
now.
I'm stuck on the issue of rounding off the result to two decimal
points, though. There are methods in NSDecimalNumber which will do
this, but I haven't worked out how to get them to function properly
yet.
No need to round.. instead drop an NSFormatter on the field in
Interface Builder and set it to show only two decimal places.
_______________________________________________
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.