That's what i did in the fix. I copied the code from the original
WhenCollection, ran the unittests (who deal with when collections,
and do not clear()) and therefore missed that now no longer needed
cast....
Frank Mantek
Google
On Oct 8, 2007, at 3:46 PM, Kulvinder Singh wrote:
> Hi Frank,
>
> Thanks for you prompt reply. I was just trying to update an
> existing event in my Google Calendar using :
>
> EventEntry entry = GetEntry(id);
> entry.Location.Clear();
> entry.Locations.Add(new Where("Hello"));
> entry.Update();
>
> and it threw an error at entry.Location.Clear();
>
> For the time being, i have removed the "When" casting used in the
> OnClear Method.
>
> Thanks
> Kulvinder Singh
>
> ----- Original Message ----
> From: Frank Mantek <[EMAIL PROTECTED]>
> To: [email protected]
> Sent: Monday, October 8, 2007 7:13:04 PM
> Subject: Re: Another New Bug in 1.1.0.0 .NET Calendar API
>
> Fixed and submitted (including DLLs). Another cut/copy/paste error
> when creating the new base class...
>
> We need more unittests, i thought i had tests that cover this...
> What was your code doing to trigger this error?
>
> Frank Mantek
> Google
> On Oct 8, 2007, at 2:32 PM, Kulvinder Singh wrote:
>
>> Hi,
>>
>> I was trying to update an existing event in Google and got the
>> follwong error :
>>
>> Unable to cast object of type 'Google.GData.Extensions.Where' to
>> type 'Google.GData.Extensions.When'.
>>
>> Source : Google.GData.Extensions
>>
>> StackTrace : at Google.GData.Extensions.ExtensionCollection.OnClear
>> () in Google.GData.Extensions\extcollections.cs:line 130
>>
>> at System.Collections.CollectionBase.Clear()
>>
>>
>> and when i looked at this line 130 :
>>
>>
>> /// <summary>
>>
>> /// base class to take an object pointer with extension information
>>
>> /// and expose a localname/namespace subset as a collection
>>
>> /// that still works on the original
>>
>> /// </summary>
>>
>> public class ExtensionCollection : CollectionBase
>>
>> {
>>
>>
>> protected override void OnClear()
>>
>> {
>>
>> for (int i=0; i< this.Count;i++)
>>
>> {
>>
>> this.atomElement.ExtensionElements.Remove((When)List[i]);
>>
>> }
>>
>> }
>>
>>
>> }
>>
>>
>>
>> Can anybody tell me why there is Casting of List[i] to "When"
>> object ?
>>
>>
>> Thanks
>>
>> Kulvinder Singh
>>
>>
>>
>> Need a vacation? Get great deals to amazing places on Yahoo! Travel.
>>
>>
>
>
>
>
> Check out the hottest 2008 models today at Yahoo! Autos.
> >
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Google Calendar Data API" group.
To post to this group, send email to
[email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/google-calendar-help-dataapi?hl=en
-~----------~----~----~----~------~----~------~--~---