cache the "startDate"

This commit is contained in:
Wolfgang Sourdeau committed 2012-10-30 08:49:02 -04:00
1 parent 20cb769db1
commit 40a1a51845
2 files changed
+16 -2

No files matched your search

+3
View File
@@ -30,6 +30,9 @@
@class iCalRecurrenceRule;
@interface iCalTimeZonePeriod : CardGroup
{
NSCalendarDate *startDate;
}
- (NSCalendarDate *) startDate;
- (iCalRecurrenceRule *) recurrenceRule;
+13 -2
View File
@@ -103,10 +103,21 @@
// return dayOfWeek;
// }
- (void) dealloc
{
[startDate release];
[super dealloc];
}
- (NSCalendarDate *) startDate
{
return [(iCalDateTime *) [self uniqueChildWithTag: @"dtstart"]
dateTime];
if (!startDate)
{
startDate = [(iCalDateTime *) [self uniqueChildWithTag: @"dtstart"]
dateTime];
[startDate retain];
}
return startDate;
}
- (iCalRecurrenceRule *) recurrenceRule