Monotone-Parent: ea84b0da49761a54044bb70c2502171c1b981e86

Monotone-Revision: 6e9eca21067a5f64a1567bdae3318eaa6f1b85dd

Monotone-Author: wsourdeau@inverse.ca
Monotone-Date: 2010-10-26T18:21:55
Monotone-Branch: ca.inverse.sogo
maint-2.0.2
Wolfgang Sourdeau 2010-10-26 18:21:55 +00:00
parent 3743b78fff
commit 9bd55f166b
3 changed files with 19 additions and 9 deletions

View File

@ -89,6 +89,7 @@
- (void) addType: (NSString *) aType;
- (NSString *) tag;
- (void) setValues: (NSArray *) newValues;
- (NSArray *) values;
- (NSDictionary *) attributes;
- (BOOL) hasAttribute: (NSString *) aType
@ -102,7 +103,6 @@
- (id) elementWithClass: (Class) elementClass;
- (void) setValuesAsCopy: (NSMutableArray *) someValues;
- (void) setAttributesAsCopy: (NSMutableDictionary *) someAttributes;
- (NSMutableArray *) deepCopyOfArray: (NSArray *) oldArray

View File

@ -219,6 +219,16 @@
[self addAttribute: @"type" value: aType];
}
- (void) setValues: (NSArray *) newValues
{
if (![newValues isKindOfClass: [NSMutableArray class]])
{
newValues = [newValues mutableCopy];
[newValues autorelease];
}
ASSIGN (values, newValues);
}
- (NSArray *) values
{
return values;
@ -476,7 +486,7 @@
newElement = [elementClass new];
[newElement autorelease];
[newElement setTag: tag];
[newElement setValuesAsCopy: values];
[newElement setValues: values];
[newElement setAttributesAsCopy: attributes];
if (group)
[newElement setGroup: group];
@ -491,11 +501,6 @@
return newElement;
}
- (void) setValuesAsCopy: (NSMutableArray *) someValues
{
ASSIGN (values, someValues);
}
- (void) setAttributesAsCopy: (NSMutableDictionary *) someAttributes
{
ASSIGN (attributes, someAttributes);
@ -567,7 +572,7 @@
newGroup = [group copyWithZone: aZone];
[new setGroup: newGroup];
[newGroup release];
[new setValuesAsCopy: [self deepCopyOfArray: values withZone: aZone]];
[new setValues: [self deepCopyOfArray: values withZone: aZone]];
[new setAttributesAsCopy: [self deepCopyOfDictionary: attributes
withZone: aZone]];
@ -588,7 +593,7 @@
newGroup = [group copyWithZone: aZone];
[new setGroup: newGroup];
[newGroup release];
[new setValuesAsCopy: [self deepCopyOfArray: values withZone: aZone]];
[new setValues: [self deepCopyOfArray: values withZone: aZone]];
[new setAttributesAsCopy: [self deepCopyOfDictionary: attributes
withZone: aZone]];

View File

@ -1,3 +1,8 @@
2010-10-26 Wolfgang Sourdeau <wsourdeau@inverse.ca>
* CardElement.m (-setValues:): new method. Actual renamed version
of prior setValuesAsCopy:.
2010-10-18 Wolfgang Sourdeau <wsourdeau@inverse.ca>
* iCalTimeZone.m (-dateForDateTimeString:): adjust dates since