Add a few OSX compatibility methods

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@33929 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
Richard Frith-MacDonald 2011-10-02 11:17:49 +00:00
parent 377a757e54
commit cbf54ac301
8 changed files with 111 additions and 27 deletions

View file

@ -314,6 +314,14 @@ GS_EXPORT NSString* const GSLocale;
*/
- (NSDictionary*) dictionaryForKey: (NSString*)defaultName;
#if OS_API_VERSION(MAC_OS_X_VERSION_10_5, GS_API_LATEST)
/**
* Looks up a value for a specified default using -objectForKey:
* and checks that it is a double. Returns 0.0 if it is not.
*/
- (double) doubleForKey: (NSString*)defaultName;
#endif
/**
* Looks up a value for a specified default using -objectForKey:
* and checks that it is a float. Returns 0.0 if it is not.
@ -380,6 +388,15 @@ GS_EXPORT NSString* const GSLocale;
*/
- (void) setBool: (BOOL)value forKey: (NSString*)defaultName;
#if OS_API_VERSION(MAC_OS_X_VERSION_10_5, GS_API_LATEST)
/**
* Sets a double value for defaultName in the application domain.<br />
* Calls -setObject:forKey: to make the change by storing a double
* [NSNumber] instance.
*/
- (void) setDouble: (double)value forKey: (NSString*)defaultName;
#endif
/**
* Sets a float value for defaultName in the application domain.<br />
* Calls -setObject:forKey: to make the change by storing a float