mirror of
https://github.com/gnustep/libs-base.git
synced 2025-05-31 00:30:53 +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
af62a9bf84
commit
b06da7b65c
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>
|
2003-06-08 Fred Kiefer <FredKiefer@gmx.de>
|
||||||
|
|
||||||
* Source/NSString.m
|
* Source/NSString.m
|
||||||
|
|
|
@ -27,6 +27,7 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "Foundation/NSDictionary.h"
|
#include "Foundation/NSDictionary.h"
|
||||||
|
#include "Foundation/NSException.h"
|
||||||
#include "Foundation/NSString.h"
|
#include "Foundation/NSString.h"
|
||||||
#include "Foundation/NSAttributedString.h"
|
#include "Foundation/NSAttributedString.h"
|
||||||
#include "Foundation/NSDecimalNumber.h"
|
#include "Foundation/NSDecimalNumber.h"
|
||||||
|
@ -148,7 +149,23 @@
|
||||||
forString: (NSString*)string
|
forString: (NSString*)string
|
||||||
errorDescription: (NSString**)error
|
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
|
- (BOOL) hasThousandSeparators
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue