Monotone-Parent: cbf125640f6348895aa302fdfc58f2a13c96cc80

Monotone-Revision: 9f129d083b11ce7ac964a083c351d2a15f16fbdb

Monotone-Author: wsourdeau@inverse.ca
Monotone-Date: 2010-08-11T13:31:59
Monotone-Branch: ca.inverse.sogo
maint-2.0.2
Wolfgang Sourdeau 2010-08-11 13:31:59 +00:00
parent fbc36faf17
commit 43ef41eeb7
2 changed files with 15 additions and 2 deletions

View File

@ -1,3 +1,9 @@
2010-08-11 Wolfgang Sourdeau <wsourdeau@inverse.ca>
* UI/Common/UIxPageFrame.m (_dictionaryWithKeys:fromSource:):
set an NSNull as value for keys which return no results, in order
to avoid an NSInvalidArgumentException.
2010-08-09 Wolfgang Sourdeau <wsourdeau@inverse.ca>
* UI/WebServerResources/MailerUI.js (openMailbox): removed the

View File

@ -21,6 +21,7 @@
*/
#import <Foundation/NSEnumerator.h>
#import <Foundation/NSNull.h>
#import <Foundation/NSString.h>
#import <NGObjWeb/WOResourceManager.h>
@ -465,6 +466,10 @@
NSString *key;
int count, max;
NSMutableDictionary *dict;
NSNull *nsNull;
id value;
nsNull = [NSNull null];
max = [keys count];
@ -472,8 +477,10 @@
for (count = 0; count < max; count++)
{
key = [keys objectAtIndex: count];
[dict setObject: [source objectForKey: key]
forKey: key];
value = [source objectForKey: key];
if (!value)
value = nsNull;
[dict setObject: value forKey: key];
}
return [dict jsonRepresentation];