From dbd5d26a3c5bdc2c8a7f30153a0ed7c6b42d8ef0 Mon Sep 17 00:00:00 2001 From: Wolfgang Sourdeau Date: Tue, 3 Jul 2007 15:59:45 +0000 Subject: [PATCH] Monotone-Parent: eb165ac64bb67362d5ea6d43b6f390aeb1efe013 Monotone-Revision: 4254b3aaa317d0b5f76c8d289e790123b2d1ae94 Monotone-Author: wsourdeau@inverse.ca Monotone-Date: 2007-07-03T15:59:45 Monotone-Branch: ca.inverse.sogo --- SOPE/NGCards/ChangeLog | 5 +++++ SOPE/NGCards/iCalRecurrenceRule.m | 21 ++++++++++++++------- 2 files changed, 19 insertions(+), 7 deletions(-) diff --git a/SOPE/NGCards/ChangeLog b/SOPE/NGCards/ChangeLog index 38fb57ed6..c8d55d56a 100644 --- a/SOPE/NGCards/ChangeLog +++ b/SOPE/NGCards/ChangeLog @@ -1,5 +1,10 @@ 2007-07-03 Wolfgang Sourdeau + * iCalRecurrenceRule.m ([iCalRecurrenceRule + +recurrenceRuleWithICalRepresentation:_iCalRep]): the + representation is generally a series of values separated by a ";". + Therefore we need to split those values and feed them one by one. + * CardElement.m ([CardElement -versitString]): remove the ending "\r\n". diff --git a/SOPE/NGCards/iCalRecurrenceRule.m b/SOPE/NGCards/iCalRecurrenceRule.m index 9842dd455..fe66f48cc 100644 --- a/SOPE/NGCards/iCalRecurrenceRule.m +++ b/SOPE/NGCards/iCalRecurrenceRule.m @@ -71,7 +71,13 @@ + (id) recurrenceRuleWithICalRepresentation: (NSString *) _iCalRep { - return [self simpleElementWithTag: @"rrule" value: _iCalRep]; + iCalRecurrenceRule *rule; + + rule = [self elementWithTag: @"rrule"]; + if ([_iCalRep length] > 0) + [rule addValues: [_iCalRep componentsSeparatedByString: @";"]]; + + return rule; } - (id) init @@ -289,7 +295,7 @@ return mask; } -#warning this is fucked up +#warning this is bad - (int) byDayOccurence1 { return 0; @@ -329,11 +335,12 @@ if (c1 == 'u' || c1 == 'U') return iCalWeekDaySunday; } } - - // TODO: do not raise but rather return an error value? - [NSException raise:NSGenericException - format:@"Incorrect weekDay '%@' specified!", _day]; - return iCalWeekDayMonday; /* keep compiler happy */ + + return -1; +// // TODO: do not raise but rather return an error value? +// [NSException raise:NSGenericException +// format:@"Incorrect weekDay '%@' specified!", _day]; +// return iCalWeekDayMonday; /* keep compiler happy */ } - (NSString *) iCalRepresentationForWeekDay: (iCalWeekDay) _weekDay