Monotone-Parent: b1c2ca52ec5ce74741f62b95f3be18e4d6c99949
Monotone-Revision: ef48f0aa709b92913c131c539cb55562e8c56ebf Monotone-Author: wsourdeau@inverse.ca Monotone-Date: 2012-03-01T21:55:41maint-2.0.2
parent
f42bb82deb
commit
22181c5996
|
@ -1,3 +1,8 @@
|
||||||
|
2012-03-01 Wolfgang Sourdeau <wsourdeau@inverse.ca>
|
||||||
|
|
||||||
|
* SoObjects/SOGo/NSArray+Utilities.m (-[NSMutableArray
|
||||||
|
removeDoubles]): new method removing doublons.
|
||||||
|
|
||||||
2012-03-01 Francis Lachapelle <flachapelle@inverse.ca>
|
2012-03-01 Francis Lachapelle <flachapelle@inverse.ca>
|
||||||
|
|
||||||
* UI/WebServerResources/ContactsUI.js (appendAddressBook): assume
|
* UI/WebServerResources/ContactsUI.js (appendAddressBook): assume
|
||||||
|
|
|
@ -70,6 +70,8 @@
|
||||||
|
|
||||||
- (void) addObjectUniquely: (id) object;
|
- (void) addObjectUniquely: (id) object;
|
||||||
|
|
||||||
|
- (void) removeDoubles;
|
||||||
|
|
||||||
- (BOOL) hasRangeIntersection: (NSRange) testRange;
|
- (BOOL) hasRangeIntersection: (NSRange) testRange;
|
||||||
|
|
||||||
@end
|
@end
|
||||||
|
|
|
@ -324,4 +324,20 @@
|
||||||
return response;
|
return response;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
- (void) removeDoubles
|
||||||
|
{
|
||||||
|
NSMutableDictionary *valueDicts;
|
||||||
|
NSNull *dummy;
|
||||||
|
NSUInteger count, max;
|
||||||
|
|
||||||
|
dummy = [NSNull null];
|
||||||
|
|
||||||
|
max = [self count];
|
||||||
|
valueDicts = [NSMutableDictionary dictionaryWithCapacity: max];
|
||||||
|
|
||||||
|
for (count = 0; count < max; count++)
|
||||||
|
[valueDicts setObject: dummy forKey: [self objectAtIndex: count]];
|
||||||
|
[self setArray: [valueDicts allKeys]];
|
||||||
|
}
|
||||||
|
|
||||||
@end
|
@end
|
||||||
|
|
Loading…
Reference in New Issue