Permalink
Browse files

Fix record update

  • Loading branch information...
1 parent 3c60de8 commit ac0521b9f2287f488ad3c1f9c8d4dfb274a446a5 @nparry committed Mar 20, 2009
Showing with 4 additions and 3 deletions.
  1. +4 −3 BirthdaySyncer.m
View
@@ -76,13 +76,12 @@ -(id)init {
NSString *username = [[NSUserDefaults standardUserDefaults] stringForKey:@"googleUsername"];
NSString *password = getBirthdaySyncPassword();
- NSLog(@"User info: %@, %@", username, password);
+ //NSLog(@"User info: %@, %@", username, password);
calendarService_ = [[GDataServiceGoogleCalendar alloc] init];
[calendarService_ setUserAgent:kBirthdaySyncUserAgent];
[calendarService_ setShouldCacheDatedData:YES];
[calendarService_ setServiceShouldFollowNextLinks:YES];
- //[calendarService_ setShouldUseMethodOverrideHeader:YES];
[calendarService_ setUserCredentialsWithUsername:username
password:password];
@@ -368,6 +367,8 @@ -(GDataEntryCalendarEvent*)modifyEvent:(GDataEntryCalendarEvent*)event
[self setNameOnEvent:event fromRecord:record];
[self setDateOnEvent:event fromRecord:record];
+ [calendarService_ setShouldUseMethodOverrideHeader:YES];
+
GDataServiceTicket *ticket =
[calendarService_ fetchCalendarEventEntryByUpdatingEntry:event
forEntryURL:[[event editLink] URL]
@@ -408,7 +409,7 @@ -(void)setDateOnEvent:(GDataEntryCalendarEvent*)event fromRecord:(NSDictionary*)
[birthday descriptionWithCalendarFormat:descriptionFormat
timeZone:NULL
locale:NULL]];
- [event setSummaryWithString:description];
+ [event setContentWithString:description];
NSDate *nextDay = [birthday addTimeInterval:(24*60*60)];
NSString *dateFormat = @"%Y%m%d";

0 comments on commit ac0521b

Please sign in to comment.