mirror of
https://github.com/inverse-inc/sogo.git
synced 2026-04-04 21:08:51 +00:00
Monotone-Parent: 8f8ecd8d738bfaf099722644bfbdaee74d8b589d
Monotone-Revision: 8eb1c04a52c5c9e085d3376ba6f9142b007cf6b7 Monotone-Author: wsourdeau@inverse.ca Monotone-Date: 2008-02-22T21:21:24 Monotone-Branch: ca.inverse.sogo
This commit is contained in:
@@ -1,5 +1,8 @@
|
||||
2008-02-22 Wolfgang Sourdeau <wsourdeau@inverse.ca>
|
||||
|
||||
* SoObjects/SOGo/NSArray+Utilities.m ([NSArray -uniqueObjects]):
|
||||
new method that returns unique occurences of the objects.
|
||||
|
||||
* SoObjects/Contacts/SOGoContactGCSFolder.m ([SOGoContactGCSFolder
|
||||
-davNamespaces]): same as below.
|
||||
|
||||
|
||||
@@ -36,6 +36,8 @@
|
||||
- (NSArray *) objectsForKey: (NSString *) key;
|
||||
- (NSArray *) flattenedArray;
|
||||
|
||||
- (NSArray *) uniqueObjects;
|
||||
|
||||
- (BOOL) containsCaseInsensitiveString: (NSString *) match;
|
||||
|
||||
#ifdef GNUSTEP_BASE_LIBRARY
|
||||
|
||||
@@ -105,6 +105,21 @@
|
||||
return flattenedArray;
|
||||
}
|
||||
|
||||
- (NSArray *) uniqueObjects
|
||||
{
|
||||
NSMutableArray *newArray;
|
||||
NSEnumerator *objects;
|
||||
id currentObject;
|
||||
|
||||
newArray = [NSMutableArray array];
|
||||
|
||||
objects = [self objectEnumerator];
|
||||
while ((currentObject = [objects nextObject]))
|
||||
[newArray addObjectUniquely: currentObject];
|
||||
|
||||
return newArray;
|
||||
}
|
||||
|
||||
- (void) makeObjectsPerform: (SEL) selector
|
||||
withObject: (id) object1
|
||||
withObject: (id) object2
|
||||
|
||||
Reference in New Issue
Block a user