Monotone-Parent: 6f4aca34d0b59d7ae94fc6372510067926e9d0b4

Monotone-Revision: 66637dd9fbad7528514f958ca2e14068c4dc2386

Monotone-Author: wsourdeau@inverse.ca
Monotone-Date: 2006-10-20T21:13:50
Monotone-Branch: ca.inverse.sogo
This commit is contained in:
Wolfgang Sourdeau 2006-10-20 21:13:50 +00:00
parent 17018226cb
commit f5611606f2

View file

@ -32,8 +32,8 @@
- (NSString *) singleAttributeWithName: (NSString *) key - (NSString *) singleAttributeWithName: (NSString *) key
{ {
return [[self attributeWithName: key] return [[self attributeWithName: key]
stringValueAtIndex: 0]; stringValueAtIndex: 0];
} }
- (NSDictionary *) asDictionaryWithAttributeNames: (NSArray *) attributeNames - (NSDictionary *) asDictionaryWithAttributeNames: (NSArray *) attributeNames
@ -52,15 +52,13 @@
attribute = [attrEnum nextObject]; attribute = [attrEnum nextObject];
while (attribute) while (attribute)
{ {
[valuesDict setObject: [[self attributeWithName: attribute] [valuesDict setObject: [self singleAttributeWithName: attribute]
stringValueAtIndex: 0]
forKey: attribute]; forKey: attribute];
attribute = [attrEnum nextObject]; attribute = [attrEnum nextObject];
} }
if (cName) if (cName)
{ {
value = [[self attributeWithName: cName] value = [self singleAttributeWithName: cName];
stringValueAtIndex: 0];
if (!value) if (!value)
value = @""; value = @"";
NSLog (@"value for '%@' = '%@'", cName, value); NSLog (@"value for '%@' = '%@'", cName, value);
@ -69,8 +67,7 @@
} }
if (uid) if (uid)
{ {
value = [[self attributeWithName: uid] value = [self singleAttributeWithName: uid];
stringValueAtIndex: 0];
if (!value) if (!value)
value = @""; value = @"";
NSLog (@"value for '%@' = '%@'", uid, value); NSLog (@"value for '%@' = '%@'", uid, value);