Monotone-Parent: 96d751786922d33162cb95008bfb6f6460b05db4

Monotone-Revision: e1d77c8035a84435f5745fe6e47f1fb5c978d808

Monotone-Author: wsourdeau@inverse.ca
Monotone-Date: 2011-03-21T00:38:17
Monotone-Branch: ca.inverse.sogo
maint-2.0.2
Wolfgang Sourdeau 2011-03-21 00:38:17 +00:00
parent 071bdd863f
commit b62149d65f
4 changed files with 28 additions and 6 deletions

View File

@ -48,6 +48,8 @@
- (void) addChild: (CardElement *) aChild;
- (void) addChildren: (NSArray *) someChildren;
- (void) removeChild: (CardElement *) aChild;
- (void) removeChildren: (NSArray *) someChildren;
- (NSMutableArray *) children;
- (CardElement *) firstChildWithTag: (NSString *) aTag;

View File

@ -253,6 +253,22 @@ static NGCardsSaxHandler *sax = nil;
[self addChild: currentChild];
}
- (void) removeChild: (CardElement *) aChild
{
[aChild setParent: nil];
[children removeObject: aChild];
}
- (void) removeChildren: (NSArray *) someChildren
{
CardElement *currentChild;
NSEnumerator *newChildren;
newChildren = [someChildren objectEnumerator];
while ((currentChild = [newChildren nextObject]))
[self removeChild: currentChild];
}
- (NSMutableArray *) children
{
return children;

View File

@ -1,3 +1,8 @@
2011-03-20 Wolfgang Sourdeau <wsourdeau@inverse.ca>
* CardGroup.m (-removeChild:, -removeChildren:): new
self-explanatory methods.
2011-03-15 Wolfgang Sourdeau <wsourdeau@inverse.ca>
* NSString+NGCards.m (-asCardAttributeValues): rewritten method

View File

@ -54,7 +54,7 @@
- (void) removeAllRecurrenceRules
{
[children removeObjectsInArray: [self childrenWithTag: @"rrule"]];
[self removeChildren: [self recurrenceRules]];
}
- (void) addToRecurrenceRules: (id) _rrule
@ -80,7 +80,7 @@
- (void) removeAllExceptionRules
{
[children removeObjectsInArray: [self childrenWithTag: @"exrule"]];
[self removeChildren: [self exceptionRules]];
}
- (void) addToExceptionRules: (id) _rrule
@ -106,7 +106,7 @@
- (void) removeAllExceptionDates
{
[children removeObjectsInArray: [self childrenWithTag: @"exdate"]];
[self removeChildren: [self exceptionDates]];
}
- (void) addToExceptionDates: (NSCalendarDate *) _rdate
@ -171,8 +171,7 @@
*/
- (NSArray *) exceptionDatesWithEventTimeZone: (iCalTimeZone *) theTimeZone
{
NSArray *exDates;
NSMutableArray *dates;
NSArray *dates, *exDates;
NSEnumerator *dateList;
NSCalendarDate *exDate;
NSString *dateString;
@ -190,7 +189,7 @@
{
dateString = [exDates objectAtIndex: i];
exDate = [theTimeZone computedDateForString: dateString];
[dates addObject: exDate];
[(NSMutableArray *) dates addObject: exDate];
}
}
}