Skip navigation.
 
mlAdding text in NSNumberFormatter string - 'e' not allowed?
FROM : Rick Hoge
DATE : Sat Apr 02 16:07:47 2005

Recently it occurred to me that it would be useful to add text in the
Interface Builder format field for number formatters.

For example instead of "#,##0.00" in the field for Positive I might
"#,##0.00 kilometres" or something (to have units added).

What seems to happen is that the letter 'e' is removed from the text
when the edit is committed by tabbing out of the field, so I get
"#,##0.00 kilomtrs"

I am guessing that 'e' is some kind of reserved character, but I can't
find a reference to this usage in the docs.  So my two questions are:

1)  is this a dangerous misuse of NSNumberFormatter?

2) if not, is there any way I can quote characters or strings to have
them included in the format string?

Thanks for any suggestions,

Rick

Related mailsAuthorDate
mlAdding text in NSNumberFormatter string - 'e' not allowed? Rick Hoge Apr 2, 16:07
mlRe: Adding text in NSNumberFormatter string - 'e' not allowed? Serge Meynard Apr 2, 18:51