NSNumberFormatters and [] characters
NSNumberFormatters and [] characters
- Subject: NSNumberFormatters and [] characters
- From: Angela Brett <email@hidden>
- Date: Sun, 31 Oct 2004 11:59:21 +1300
Hi,
I've been asked to display negative currencies in the app I'm writing
in red with [Dr] after them. It didn't make much sense to me
(apparently Dr stands for debit record) but it is consistent with the
way the same information is displayed on the website, so I'll go
along with it. I'm using an NSNumberFormatter to format the
currencies, which was fine back when I was indicating negative
numbers with the negative sign. But now that I try to enter [Dr] in
the negative format, either in IB or in code, the [ and ] disappear.
I've read the documentation on format string syntax, which has no
mention of any special meaning for those two characters, and says:
All other characters specified in a number format string are
displayed as typed.
Is this a bug? If so, is it a bug in NSNumberFormatter, or just a bug
in the documentation? Does anyone know if there is a way of getting [
and ] to appear? I've tried [[ and \[ to no avail.
--
Angela Brett
email@hidden
http://NSCoder.com
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden