Re: Configuring NSNumberFormatter non-programmatically
Re: Configuring NSNumberFormatter non-programmatically
- Subject: Re: Configuring NSNumberFormatter non-programmatically
- From: Kirk Swenson <email@hidden>
- Date: Tue, 23 Dec 2008 09:38:19 -0800
On Dec 22, 2008, at 9:11 AM, Avery Nickelby wrote:
I've looked through the archives and the documentation; most of the
information is related to using NSNumberFormatter programatically. I
am
looking for a good explanation for using 10.4 style data formatters in
Interface Builder; when I configure a number data formatter I can
only get
one of two behaviors (I've tried different permutations of the
switches in
IB):
1) User MUST type in a currency symbol before the field accepts
input. The
information is displayed as $123.45.
2) The user doesn't type in a currency symbol. The information is just
displayed in decimal format (123.45)
I want: The user types in a number. The formatter looks up the
appropriate
currency symbol tied to the user-defined default locale and displays a
locale-specific format.
How do I get this behavior? Do I need to revert to the old style
(which I
can get to work)?
It's not an IB solution, but you may want to take a look at
NSFormatter's editingStringForObjectValue: method, which allows
derived classes to specify a different string for editing (without the
currency symbol) than for the displayed string (with the currency
symbol).
Kirk Swenson
KCP Technologies
_______________________________________________
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