From b4ed22ec43d0485d55bd66b76354bf9272076935 Mon Sep 17 00:00:00 2001 From: Andreas Monitzer Date: Sat, 7 Feb 2015 02:06:54 +0100 Subject: [PATCH 1/3] Fixed initialization of the classes. --- MXLCalendarManager/MXLCalendar.m | 2 +- MXLCalendarManager/MXLCalendarEvent.m | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/MXLCalendarManager/MXLCalendar.m b/MXLCalendarManager/MXLCalendar.m index 29269ed..23a0e71 100644 --- a/MXLCalendarManager/MXLCalendar.m +++ b/MXLCalendarManager/MXLCalendar.m @@ -29,7 +29,7 @@ @implementation MXLCalendar -(id)init { - self = [super self]; + self = [super init]; if (self) { self.events = [[NSMutableArray alloc] init]; daysOfEvents = [[NSMutableDictionary alloc] init]; diff --git a/MXLCalendarManager/MXLCalendarEvent.m b/MXLCalendarManager/MXLCalendarEvent.m index 73ea5ec..ed8de6c 100644 --- a/MXLCalendarManager/MXLCalendarEvent.m +++ b/MXLCalendarManager/MXLCalendarEvent.m @@ -43,7 +43,7 @@ @implementation MXLCalendarEvent -(id)initWithStartDate:(NSString *)startString endDate:(NSString *)endString createdAt:(NSString *)createdString lastModified:(NSString *)lastModifiedString uniqueID:(NSString *)uniqueID recurrenceID:(NSString *)recurrenceID summary:(NSString *)summary description:(NSString *)description location:(NSString *)location status:(NSString *)status recurrenceRules:(NSString *)recurRules exceptionDates:(NSMutableArray *)exceptionDates exceptionRule:(NSString *)exceptionRule timeZoneIdentifier:(NSString *)timezoneID { - self = [super self]; + self = [super init]; if (self) { calendar = [[NSCalendar alloc] initWithCalendarIdentifier:NSCalendarIdentifierGregorian]; From fee597c709fb11f344fea34bcd42eb1c6514471a Mon Sep 17 00:00:00 2001 From: Andreas Monitzer Date: Sat, 7 Feb 2015 02:07:09 +0100 Subject: [PATCH 2/3] Removed some dead code. --- MXLCalendarManager/MXLCalendarEvent.m | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/MXLCalendarManager/MXLCalendarEvent.m b/MXLCalendarManager/MXLCalendarEvent.m index ed8de6c..da045d4 100644 --- a/MXLCalendarManager/MXLCalendarEvent.m +++ b/MXLCalendarManager/MXLCalendarEvent.m @@ -92,8 +92,8 @@ -(void)parseRules:(NSString *)rule forType:(MXLCalendarEventRuleType)type { if (!rule) return; - NSScanner *ruleScanner = [[NSScanner alloc] initWithString:rule]; - + NSScanner *ruleScanner; + NSArray *rulesArray = [rule componentsSeparatedByString:@";"]; // Split up rules string into array NSString *frequency; From b6e346a82f5608980a90b85d18f0160b796f2548 Mon Sep 17 00:00:00 2001 From: Andreas Monitzer Date: Sun, 19 Apr 2015 17:19:24 +0200 Subject: [PATCH 3/3] Initialize NSObject as well. --- MXLCalendarManager/MXLCalendarAttendee.m | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/MXLCalendarManager/MXLCalendarAttendee.m b/MXLCalendarManager/MXLCalendarAttendee.m index 0dae1b4..7f9d70c 100644 --- a/MXLCalendarManager/MXLCalendarAttendee.m +++ b/MXLCalendarManager/MXLCalendarAttendee.m @@ -14,7 +14,7 @@ -(id) initWithRole: (Role) role commonName: (NSString *) commonName uri: (NSString *) uri { - self = super.self; + self = [super init]; if (self) { self.role = role; self.commonName = commonName;