mirror of
https://github.com/gnustep/libs-base.git
synced 2025-05-31 08:41:03 +00:00
* Source/NSNumberFormatter.m: Move the body of -init to a method called
-_NSNumberFormatterInit, and call this in -initWithCoder: so that instances created with -initWithCoder: are initialized correctly. git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@32931 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
e9e69ac659
commit
bffc43307d
2 changed files with 17 additions and 3 deletions
|
@ -1,3 +1,9 @@
|
||||||
|
2011-04-26 Eric Wasylishen <ewasylishen@gmail.com>
|
||||||
|
|
||||||
|
* Source/NSNumberFormatter.m: Move the body of -init to a method called
|
||||||
|
-_NSNumberFormatterInit, and call this in -initWithCoder: so that
|
||||||
|
instances created with -initWithCoder: are initialized correctly.
|
||||||
|
|
||||||
2011-04-26 Eric Wasylishen <ewasylishen@gmail.com>
|
2011-04-26 Eric Wasylishen <ewasylishen@gmail.com>
|
||||||
|
|
||||||
* Headers/Foundation/NSObjCRuntime.h: Add CGFLOAT_MIN and CGFLOAT_MAX
|
* Headers/Foundation/NSObjCRuntime.h: Add CGFLOAT_MIN and CGFLOAT_MAX
|
||||||
|
|
|
@ -613,14 +613,12 @@ static NSUInteger _defaultBehavior = NSNumberFormatterBehavior10_4;
|
||||||
return _hasThousandSeparators;
|
return _hasThousandSeparators;
|
||||||
}
|
}
|
||||||
|
|
||||||
- (id) init
|
- (id) _NSNumberFormatterInit
|
||||||
{
|
{
|
||||||
id o;
|
id o;
|
||||||
int idx;
|
int idx;
|
||||||
NSZone *z = [self zone];
|
NSZone *z = [self zone];
|
||||||
|
|
||||||
GS_CREATE_INTERNAL(NSNumberFormatter)
|
|
||||||
|
|
||||||
_allowsFloats = YES;
|
_allowsFloats = YES;
|
||||||
_decimalSeparator = '.';
|
_decimalSeparator = '.';
|
||||||
_thousandSeparator = ',';
|
_thousandSeparator = ',';
|
||||||
|
@ -660,6 +658,14 @@ static NSUInteger _defaultBehavior = NSNumberFormatterBehavior10_4;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
[self setMaximumFractionDigits: 0];
|
[self setMaximumFractionDigits: 0];
|
||||||
|
return self;
|
||||||
|
}
|
||||||
|
|
||||||
|
- (id) init
|
||||||
|
{
|
||||||
|
GS_CREATE_INTERNAL(NSNumberFormatter)
|
||||||
|
|
||||||
|
self = [self _NSNumberFormatterInit];
|
||||||
|
|
||||||
return self;
|
return self;
|
||||||
}
|
}
|
||||||
|
@ -668,6 +674,8 @@ static NSUInteger _defaultBehavior = NSNumberFormatterBehavior10_4;
|
||||||
{
|
{
|
||||||
GS_CREATE_INTERNAL(NSNumberFormatter)
|
GS_CREATE_INTERNAL(NSNumberFormatter)
|
||||||
|
|
||||||
|
self = [self _NSNumberFormatterInit];
|
||||||
|
|
||||||
if ([decoder allowsKeyedCoding])
|
if ([decoder allowsKeyedCoding])
|
||||||
{
|
{
|
||||||
if ([decoder containsValueForKey: @"NS.allowsfloats"])
|
if ([decoder containsValueForKey: @"NS.allowsfloats"])
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue