mirror of
https://github.com/gnustep/libs-base.git
synced 2025-05-31 00:30:53 +00:00
Minor macos-x compatibility tweak.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@25547 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
1a4a9c6613
commit
87edda35d7
3 changed files with 15 additions and 5 deletions
|
@ -1,3 +1,8 @@
|
||||||
|
2007-10-31 Richard Frith-Macdonald <rfm@gnu.org>
|
||||||
|
|
||||||
|
* Source/NSUserDefaults.m: ([setBoolForKey:]) changed to store YES
|
||||||
|
or NO as a string for MacOS-X compatibility.
|
||||||
|
|
||||||
2007-10-30 Adam Fedor <fedor@gnu.org>
|
2007-10-30 Adam Fedor <fedor@gnu.org>
|
||||||
|
|
||||||
* gnustep-base.spec.in: Change Copyright to License.
|
* gnustep-base.spec.in: Change Copyright to License.
|
||||||
|
|
|
@ -363,8 +363,8 @@ GS_EXPORT NSString* const NSLocale;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Sets a boolean value for defaultName in the application domain.<br />
|
* Sets a boolean value for defaultName in the application domain.<br />
|
||||||
* Calls -setObject:forKey: to make the change by storing a boolean
|
* Calls -setObject:forKey: to make the change by storing a string
|
||||||
* [NSNumber] instance.
|
* containing either the word YES or NO.
|
||||||
*/
|
*/
|
||||||
- (void) setBool: (BOOL)value forKey: (NSString*)defaultName;
|
- (void) setBool: (BOOL)value forKey: (NSString*)defaultName;
|
||||||
|
|
||||||
|
|
|
@ -1047,9 +1047,14 @@ static BOOL setSharedDefaults = NO; /* Flag to prevent infinite recursion */
|
||||||
|
|
||||||
- (void) setBool: (BOOL)value forKey: (NSString*)defaultName
|
- (void) setBool: (BOOL)value forKey: (NSString*)defaultName
|
||||||
{
|
{
|
||||||
NSNumber *n = [NSNumberClass numberWithBool: value];
|
if (value == YES)
|
||||||
|
{
|
||||||
[self setObject: n forKey: defaultName];
|
[self setObject: @"YES" forKey: defaultName];
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
[self setObject: @"NO" forKey: defaultName];
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
- (void) setFloat: (float)value forKey: (NSString*)defaultName
|
- (void) setFloat: (float)value forKey: (NSString*)defaultName
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue