mirror of
https://github.com/cappuccino/cappuccino.git
synced 2026-10-06 00:52:58 +00:00
add stringArrayForKey:
This commit is contained in:
1 parent
0c9cba4e71
commit
91ce1c3f6c
1 file changed
+16
@@ -493,6 +493,22 @@ var StandardUserDefaults;
|
||||
return nil;
|
||||
}
|
||||
|
||||
/*!
|
||||
Returns the string array value associated with the specified key.
|
||||
*/
|
||||
- (CPArray)stringArrayForKey:(CPString)aKey
|
||||
{
|
||||
var value = [self objectForKey:aKey];
|
||||
if ([value class] === CPArray)
|
||||
{
|
||||
for (var i = 0; i < [value count]; i++)
|
||||
if ([[value objectAtIndex:i] class] !== CPString)
|
||||
return nil;
|
||||
return value;
|
||||
}
|
||||
return nil;
|
||||
}
|
||||
|
||||
|
||||
#pragma mark -
|
||||
#pragma mark Values Setters
|
||||
|
||||
Reference in new issue
Block a user