Monotone-Parent: dd419c699778aed41ce0f743264562f00f9a7225

Monotone-Revision: 6d72460fc711cc8527393aeb0db47f3667ce0f88

Monotone-Author: wsourdeau@inverse.ca
Monotone-Date: 2007-10-23T21:59:46
Monotone-Branch: ca.inverse.sogo
This commit is contained in:
Wolfgang Sourdeau
2007-10-23 21:59:46 +00:00
parent 5d2e269842
commit ea251a4d82
3 changed files with 21 additions and 4 deletions
+8
View File
@@ -1,5 +1,13 @@
2007-10-23 Wolfgang Sourdeau <wsourdeau@inverse.ca>
* SoObjects/SOGo/NSArray+Utilities.m
([NSArray -stringsWithFormat:format]): replace instances of NSNull
with empty strings.
* SoObjects/SOGo/NSDictionary+Utilities.m ([NSDictionary
-keysWithFormat:keyFormat]): replace instances of NSNull with
empty strings.
* SoObjects/Contacts/SOGoContactLDAPFolder.m: if "displayName" is
empty, use "c_cn" instead.
+6 -2
View File
@@ -20,6 +20,7 @@
* Boston, MA 02111-1307, USA.
*/
#import <Foundation/NSNull.h>
#import <Foundation/NSString.h>
#import "NSArray+Utilities.h"
@@ -38,8 +39,11 @@
currentObject = [objects nextObject];
while (currentObject)
{
[formattedStrings
addObject: [NSString stringWithFormat: format, currentObject]];
if ([currentObject isKindOfClass: [NSNull class]])
[formattedStrings addObject: @""];
else
[formattedStrings
addObject: [NSString stringWithFormat: format, currentObject]];
currentObject = [objects nextObject];
}
+7 -2
View File
@@ -22,6 +22,7 @@
#import <Foundation/NSArray.h>
#import <Foundation/NSData.h>
#import <Foundation/NSNull.h>
#import <Foundation/NSString.h>
#import "NSArray+Utilities.h"
@@ -89,8 +90,12 @@
for (count = 0; count < max; count++)
{
value = [self objectForKey: [allKeys objectAtIndex: count]];
[keysWithFormat replaceString: [keys objectAtIndex: count]
withString: [value description]];
if ([value isKindOfClass: [NSNull class]])
[keysWithFormat replaceString: [keys objectAtIndex: count]
withString: @""];
else
[keysWithFormat replaceString: [keys objectAtIndex: count]
withString: [value description]];
}
return keysWithFormat;