From 702af743247c7eba7294080a1bf6ff9f477fe2eb Mon Sep 17 00:00:00 2001 From: Wolfgang Sourdeau Date: Thu, 19 Nov 2009 16:49:45 +0000 Subject: [PATCH] Monotone-Parent: 6e1bd1891e5cfeca7fa78369305bcad3b36d1955 Monotone-Revision: 8714a90171f0256424d65122b72c98a61ef5f55a Monotone-Author: wsourdeau@inverse.ca Monotone-Date: 2009-11-19T16:49:45 Monotone-Branch: ca.inverse.sogo --- ChangeLog | 6 +++++ UI/Scheduler/UIxComponentEditor.m | 37 +++++++++++++++---------------- 2 files changed, 24 insertions(+), 19 deletions(-) diff --git a/ChangeLog b/ChangeLog index 02be841d1..74ac63bcb 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2009-11-19 Wolfgang Sourdeau + + * UI/Scheduler/UIxComponentEditor.m (-_handleAttendeeData): make + direct use of the JSON constructor of NSDictionary rather than + instantiating an NSScanner. This simplifies the code. + 2009-11-18 Wolfgang Sourdeau * SoObjects/SOGo/NSString+Utilities.m (-isJSONString): new utility diff --git a/UI/Scheduler/UIxComponentEditor.m b/UI/Scheduler/UIxComponentEditor.m index 8bbc3260b..82680cdea 100644 --- a/UI/Scheduler/UIxComponentEditor.m +++ b/UI/Scheduler/UIxComponentEditor.m @@ -46,22 +46,22 @@ #import #import -#import -#import -#import -#import -#import -#import -#import -#import -#import -#import -#import -#import -#import -#import -#import -#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import #import "../../Main/SOGo.h" @@ -1489,7 +1489,6 @@ RANGE(2); NSDictionary *attendeesData; NSArray *attendees; NSDictionary *currentData; - NSScanner *jsonScanner; WORequest *request; request = [context request]; @@ -1497,8 +1496,8 @@ RANGE(2); if ([json length]) { attendees = [NSArray array]; - jsonScanner = [NSScanner scannerWithString: json]; - if ([jsonScanner scanJSONObject: &attendeesData]) + attendeesData = [NSDictionary dictionaryWithJSONString: json]; + if (attendeesData) { newAttendees = [NSMutableArray array]; attendees = [attendeesData allValues];