mirror of
https://github.com/gnustep/libs-base.git
synced 2025-04-22 16:33:29 +00:00
* Source/NSNumberFormatter.m
(-getObjectValue:forString:errorDescription:): Simple implementation. git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@16906 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
04c2ed4343
commit
f548be891e
2 changed files with 24 additions and 1 deletions
|
@ -1,3 +1,9 @@
|
|||
2003-06-11 Adam Fedor <fedor@gnu.org>
|
||||
|
||||
* Source/NSNumberFormatter.m
|
||||
(-getObjectValue:forString:errorDescription:): Simple
|
||||
implementation.
|
||||
|
||||
2003-06-08 Fred Kiefer <FredKiefer@gmx.de>
|
||||
|
||||
* Source/NSString.m
|
||||
|
|
|
@ -27,6 +27,7 @@
|
|||
*/
|
||||
|
||||
#include "Foundation/NSDictionary.h"
|
||||
#include "Foundation/NSException.h"
|
||||
#include "Foundation/NSString.h"
|
||||
#include "Foundation/NSAttributedString.h"
|
||||
#include "Foundation/NSDecimalNumber.h"
|
||||
|
@ -148,7 +149,23 @@
|
|||
forString: (NSString*)string
|
||||
errorDescription: (NSString**)error
|
||||
{
|
||||
return NO; // FIXME
|
||||
if (anObject == NULL)
|
||||
{
|
||||
[NSException raise: NSInvalidArgumentException
|
||||
format: @"NULL Object pointer to NSNumberFormatter"];
|
||||
/* NO RETURN. */
|
||||
return NO;
|
||||
}
|
||||
|
||||
/* FIXME: This is just a quick hack implementation. */
|
||||
NSLog(@"NSNumberFormatter-getObjectValue:forString:... not implemented");
|
||||
if (_positiveFormat == nil && _negativeFormat == nil)
|
||||
{
|
||||
/* Just assume nothing else has been setup and do a simple conversion. */
|
||||
*anObject = [NSDecimalNumber decimalNumberWithString: string];
|
||||
return YES;
|
||||
}
|
||||
return NO;
|
||||
}
|
||||
|
||||
- (BOOL) hasThousandSeparators
|
||||
|
|
Loading…
Reference in a new issue