Monotone-Parent: 45f8f00965e4667aab6443560550ea1d92c6d11d
Monotone-Revision: 10716bba581bb0dd4ad881e814040b2adb37ba10 Monotone-Author: wsourdeau@inverse.ca Monotone-Date: 2008-07-07T15:50:50 Monotone-Branch: ca.inverse.sogomaint-2.0.2
parent
6c34e49849
commit
443265db50
|
@ -124,20 +124,12 @@
|
||||||
|
|
||||||
- (void) setTag: (NSString *) aTag
|
- (void) setTag: (NSString *) aTag
|
||||||
{
|
{
|
||||||
if (tag)
|
ASSIGN (tag, aTag);
|
||||||
[tag release];
|
|
||||||
tag = aTag;
|
|
||||||
if (tag)
|
|
||||||
[tag retain];
|
|
||||||
}
|
}
|
||||||
|
|
||||||
- (void) setGroup: (NSString *) aGroup
|
- (void) setGroup: (NSString *) aGroup
|
||||||
{
|
{
|
||||||
if (group)
|
ASSIGN (group, aGroup);
|
||||||
[group release];
|
|
||||||
group = aGroup;
|
|
||||||
if (group)
|
|
||||||
[group retain];
|
|
||||||
}
|
}
|
||||||
|
|
||||||
- (NSString *) group
|
- (NSString *) group
|
||||||
|
@ -147,6 +139,8 @@
|
||||||
|
|
||||||
- (void) addValue: (NSString *) aValue
|
- (void) addValue: (NSString *) aValue
|
||||||
{
|
{
|
||||||
|
if (!aValue)
|
||||||
|
aValue = @"";
|
||||||
[values addObject: aValue];
|
[values addObject: aValue];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -156,10 +150,13 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
- (void) addAttribute: (NSString *) anAttribute
|
- (void) addAttribute: (NSString *) anAttribute
|
||||||
value: (NSString *) aType
|
value: (NSString *) aValue
|
||||||
{
|
{
|
||||||
NSMutableArray *attrValues;
|
NSMutableArray *attrValues;
|
||||||
|
|
||||||
|
if (!aValue)
|
||||||
|
aValue = @"";
|
||||||
|
|
||||||
attrValues = [attributes objectForCaseInsensitiveKey: anAttribute];
|
attrValues = [attributes objectForCaseInsensitiveKey: anAttribute];
|
||||||
if (!attrValues)
|
if (!attrValues)
|
||||||
{
|
{
|
||||||
|
@ -168,7 +165,7 @@
|
||||||
[attributes setObject: attrValues forKey: anAttribute];
|
[attributes setObject: attrValues forKey: anAttribute];
|
||||||
}
|
}
|
||||||
|
|
||||||
[attrValues addObject: aType];
|
[attrValues addObject: aValue];
|
||||||
}
|
}
|
||||||
|
|
||||||
- (void) removeValue: (NSString *) aValue
|
- (void) removeValue: (NSString *) aValue
|
||||||
|
@ -177,6 +174,9 @@
|
||||||
NSMutableArray *attrValues;
|
NSMutableArray *attrValues;
|
||||||
NSString *currentValue;
|
NSString *currentValue;
|
||||||
|
|
||||||
|
if (!aValue)
|
||||||
|
aValue = @"";
|
||||||
|
|
||||||
attrValues = [attributes objectForCaseInsensitiveKey: anAttribute];
|
attrValues = [attributes objectForCaseInsensitiveKey: anAttribute];
|
||||||
if (attrValues)
|
if (attrValues)
|
||||||
{
|
{
|
||||||
|
@ -243,8 +243,14 @@
|
||||||
- (void) setValue: (unsigned int) anInt
|
- (void) setValue: (unsigned int) anInt
|
||||||
to: (NSString *) aValue
|
to: (NSString *) aValue
|
||||||
{
|
{
|
||||||
while ([values count] <= anInt)
|
unsigned int count, max;
|
||||||
|
|
||||||
|
if (!aValue)
|
||||||
|
aValue = @"";
|
||||||
|
max = [values count];
|
||||||
|
for (count = max; count <= anInt; count++)
|
||||||
[self addValue: @""];
|
[self addValue: @""];
|
||||||
|
|
||||||
[values replaceObjectAtIndex: anInt withObject: aValue];
|
[values replaceObjectAtIndex: anInt withObject: aValue];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -307,6 +313,8 @@
|
||||||
NSString *newValue;
|
NSString *newValue;
|
||||||
unsigned int index;
|
unsigned int index;
|
||||||
|
|
||||||
|
if (!aValue)
|
||||||
|
aValue = @"";
|
||||||
newValue = [NSString stringWithFormat: @"%@=%@",
|
newValue = [NSString stringWithFormat: @"%@=%@",
|
||||||
[aValueName uppercaseString],
|
[aValueName uppercaseString],
|
||||||
aValue];
|
aValue];
|
||||||
|
@ -348,6 +356,9 @@
|
||||||
{
|
{
|
||||||
NSMutableArray *attrValues;
|
NSMutableArray *attrValues;
|
||||||
|
|
||||||
|
if (!aValue)
|
||||||
|
aValue = @"";
|
||||||
|
|
||||||
attrValues = [attributes objectForCaseInsensitiveKey: anAttribute];
|
attrValues = [attributes objectForCaseInsensitiveKey: anAttribute];
|
||||||
if (!attrValues)
|
if (!attrValues)
|
||||||
{
|
{
|
||||||
|
|
|
@ -1,3 +1,13 @@
|
||||||
|
2008-07-07 Wolfgang Sourdeau <wsourdeau@inverse.ca>
|
||||||
|
|
||||||
|
* CardElement.m ([CardElement -addValue:aValue])
|
||||||
|
([CardElement -addAttribute:anAttributevalue:aValue])
|
||||||
|
([CardElement -removeValue:aValuefromAttribute:anAttribute])
|
||||||
|
([CardElement -setValue:anIntto:aValue])
|
||||||
|
([CardElement -setNamedValue:aValueNameto:aValue])
|
||||||
|
([CardElement -setValue:anIntofAttribute:anAttributeto:aValue]):
|
||||||
|
if aValue is nil, set it to an empty string.
|
||||||
|
|
||||||
2008-07-04 Wolfgang Sourdeau <wsourdeau@inverse.ca>
|
2008-07-04 Wolfgang Sourdeau <wsourdeau@inverse.ca>
|
||||||
|
|
||||||
* CardGroup.m ([CardGroup +parseFromSource:source]): directly
|
* CardGroup.m ([CardGroup +parseFromSource:source]): directly
|
||||||
|
|
Loading…
Reference in New Issue