mirror of
https://github.com/gnustep/libs-base.git
synced 2025-04-25 01:31:08 +00:00
Set some sensible defaults to NSNumberFormatter.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@31960 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
3029c5982c
commit
d80a4a55f2
2 changed files with 14 additions and 1 deletions
|
@ -1,3 +1,7 @@
|
|||
2011-01-27 Stefan Bidigaray <stefanbidi@gmail.com>
|
||||
|
||||
* Source/NSNumberFormatter.m: Set some sensible defaults.
|
||||
|
||||
2011-01-26 Stefan Bidigaray <stefanbidi@gmail.com>
|
||||
|
||||
* Source/NSLocale.m: Add currency code to locale identifier, if present.
|
||||
|
|
|
@ -428,7 +428,16 @@ static NSUInteger _defaultBehavior = 0;
|
|||
|
||||
_behavior = _defaultBehavior;
|
||||
_locale = RETAIN([NSLocale currentLocale]);
|
||||
_style = NSNumberFormatterDecimalStyle;
|
||||
[self _resetUNumberFormat];
|
||||
if (_formatter == NULL)
|
||||
{
|
||||
RELEASE(self);
|
||||
return nil;
|
||||
}
|
||||
|
||||
// Set default values...
|
||||
[self setMaximumFractionDigits: 2];
|
||||
|
||||
return self;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue