3 messages in com.googlegroups.google-calendar-help-dataapiRe: Issues in EventEntry class
FromSent OnAttachments
Kulvinder Singh18 Apr 2008 04:03 
Kulvinder Singh18 Apr 2008 04:11 
Frank Mantek18 Apr 2008 09:42 
Subject:Re: Issues in EventEntry class
From:Kulvinder Singh (kulv@yahoo.com)
Date:04/18/2008 04:11:44 AM
List:com.googlegroups.google-calendar-help-dataapi

Actually, the main issue is with Recurrence because of a check :

set { if (recurrence != null) { ExtensionElements.Remove(recurrence); } recurrence = value; ExtensionElements.Add(recurrence); }

the recurrence variable is always null first time, so nothing is removed from
the list and thus, one more is added to the list.

In case of Visibility and Transparency, static variables have been defined for
it. I think the same has to be corrected for QuickAdd, Status, Notification as
well.

----- Original Message ---- From: Kulvinder Singh <kulv@yahoo.com> To: Google API <goog@googlegroups.com> Sent: Friday, April 18, 2008 4:34:17 PM Subject: Issues in EventEntry class

Hi,

I am encountering some issues in implementation of EventEntry class. One of the
example is :

Create a Recurring event in GOogle, Download it using the API, change something
in the Recurrence String and set it as follows :

Google.GData.Extensions.Recurrence objGCalRecurrence = new
Google.GData.Extensions.Recurrence(); objGCalRecurrence.Value = "ical string here"; eventEntry.Recurrence = objGCalRecurrence;

The issue is that it actually adds another extension element instead of
replacing the gd:recurrence Same is the case for EventVisibility, EventTransparency and RecurrenceException

FOllowing is what is implemented in EventEntry.cs

/// <summary> /// property accessor for the Event Visibility /// </summary> public Visibility EventVisibility { get { return visibility; } set { if (visibility != null) { ExtensionElements.Remove(visibility); } visibility = value; ExtensionElements.Add(visibility); } }

/// <summary> /// property accessor for the EventTransparency /// </summary> public Transparency EventTransparency { get { return transparency;} set { if (transparency != null) { ExtensionElements.Remove(transparency); } transparency = value; ExtensionElements.Add(transparency); } }

/// <summary> /// property accessor for the Recurrence /// </summary> public Recurrence Recurrence { get { return recurrence;} set { if (recurrence != null) { ExtensionElements.Remove(recurrence); } recurrence = value; ExtensionElements.Add(recurrence); } }

/// <summary> /// property accessor for the RecurrenceException /// </summary> public RecurrenceException RecurrenceException { get { return exception;} set { if (exception != null) { ExtensionElements.Remove(exception); } exception = value; ExtensionElements.Add(exception); } }

Instead, it should be like :

/// <summary> /// property accessor for the OriginalEvent /// </summary> public OriginalEvent OriginalEvent { get { return
FindExtension(GDataParserNameTable.XmlOriginalEventElement, BaseNameTable.gNamespace) as OriginalEvent; } set { ReplaceExtension(GDataParserNameTable.XmlOriginalEventElement, BaseNameTable.gNamespace, value); } }