mirror of
https://github.com/gnustep/libs-gui.git
synced 2025-06-02 13:20:59 +00:00
Fix for decode double
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@4475 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
26e9aa14d1
commit
51c6e4f327
2 changed files with 239 additions and 218 deletions
|
@ -1,3 +1,8 @@
|
||||||
|
Fri Jun 25 12:00:00 1999 Richard Frith-Macdonald <richard@brainstorm.co.uk>
|
||||||
|
|
||||||
|
* Source/GMArchiver.m: Fix for decodeDoubleWithName: by
|
||||||
|
jagapen@whitewater.chem.wisc.edu
|
||||||
|
|
||||||
1999-06-23 Michael Hanni <mhanni@sprintmail.com>
|
1999-06-23 Michael Hanni <mhanni@sprintmail.com>
|
||||||
|
|
||||||
* Source/NSText.m: tweaked - sizeToFit and now scrollbars are
|
* Source/NSText.m: tweaked - sizeToFit and now scrollbars are
|
||||||
|
|
|
@ -1018,7 +1018,23 @@ static NSMutableDictionary* classToAliasMappings = nil;
|
||||||
|
|
||||||
- (double) decodeDoubleWithName: (NSString*)name
|
- (double) decodeDoubleWithName: (NSString*)name
|
||||||
{
|
{
|
||||||
return [self decodeDoubleWithName:name];
|
NSString* valueString;
|
||||||
|
double value;
|
||||||
|
|
||||||
|
if ( !name )
|
||||||
|
return 0;
|
||||||
|
|
||||||
|
valueString = [currentDecodedObjectRepresentation objectForKey: name];
|
||||||
|
if ( !valueString )
|
||||||
|
return 0;
|
||||||
|
|
||||||
|
if ( ![[NSScanner scannerWithString: valueString] scanDouble: &value] )
|
||||||
|
{
|
||||||
|
NSLog(@"Cannot scan double value '%@' from object '%@' under key '%@'",
|
||||||
|
valueString, currentDecodedObjectRepresentation, name);
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
return value;
|
||||||
}
|
}
|
||||||
|
|
||||||
- (NSPoint) decodePointWithName: (NSString*)name
|
- (NSPoint) decodePointWithName: (NSString*)name
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue