mirror of
https://github.com/inverse-inc/sogo.git
synced 2026-07-07 01:15:09 +00:00
Monotone-Parent: af5a859ee61b26ffd727e648f95c54ee60e3079e
Monotone-Revision: 668c4f876568e36b66e3c665c37e3108a08fb967 Monotone-Author: wsourdeau@inverse.ca Monotone-Date: 2007-08-15T19:50:20 Monotone-Branch: ca.inverse.sogo
This commit is contained in:
@@ -33,6 +33,7 @@
|
||||
id currentObject;
|
||||
|
||||
formattedStrings = [NSMutableArray arrayWithCapacity: [self count]];
|
||||
|
||||
objects = [self objectEnumerator];
|
||||
currentObject = [objects nextObject];
|
||||
while (currentObject)
|
||||
@@ -45,6 +46,61 @@
|
||||
return formattedStrings;
|
||||
}
|
||||
|
||||
- (NSArray *) keysWithFormat: (NSString *) format
|
||||
{
|
||||
NSMutableArray *formattedStrings;
|
||||
NSEnumerator *objects;
|
||||
id currentObject;
|
||||
|
||||
formattedStrings = [NSMutableArray arrayWithCapacity: [self count]];
|
||||
|
||||
objects = [self objectEnumerator];
|
||||
currentObject = [objects nextObject];
|
||||
while (currentObject)
|
||||
{
|
||||
[formattedStrings addObject: [currentObject keysWithFormat: format]];
|
||||
currentObject = [objects nextObject];
|
||||
}
|
||||
|
||||
return formattedStrings;
|
||||
}
|
||||
|
||||
- (NSArray *) objectsForKey: (NSString *) key
|
||||
{
|
||||
NSMutableArray *objectsForKey;
|
||||
unsigned int count, max;
|
||||
id value;
|
||||
|
||||
max = [self count];
|
||||
objectsForKey = [NSMutableArray arrayWithCapacity: max];
|
||||
|
||||
for (count = 0; count < max; count++)
|
||||
{
|
||||
value = [[self objectAtIndex: count] objectForKey: key];
|
||||
[objectsForKey addObject: value];
|
||||
}
|
||||
|
||||
return objectsForKey;
|
||||
}
|
||||
|
||||
- (NSArray *) flattenedArray
|
||||
{
|
||||
NSMutableArray *flattenedArray;
|
||||
NSEnumerator *objects;
|
||||
id currentObject;
|
||||
|
||||
flattenedArray = [NSMutableArray array];
|
||||
objects = [self objectEnumerator];
|
||||
currentObject = [objects nextObject];
|
||||
while (currentObject)
|
||||
{
|
||||
[flattenedArray addObjectsFromArray: currentObject];
|
||||
currentObject = [objects nextObject];
|
||||
}
|
||||
|
||||
return flattenedArray;
|
||||
}
|
||||
|
||||
- (void) makeObjectsPerform: (SEL) selector
|
||||
withObject: (id) object1
|
||||
withObject: (id) object2
|
||||
|
||||
Reference in New Issue
Block a user