Ebeo / google-gdata

Automatically exported from code.google.com/p/google-gdata
0 stars 0 forks source link

CalendarEntry.Hidden Throws an Exception #323

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Using The Following code (VB.NET)

Dim NewCalendar As New CalendarEntry()
    NewCalendar.Title.Text = txtTitle.text
    NewCalendar.Summary.Text = txtSummary.text
    NewCalendar.TimeZone = cbTZone.selectedvalue
    NewCalendar.Hidden = False
    NewCalendar.Color = ColorTranslator.ToHtml(txtColor.backcolor)
    NewCalendar.Location = New Google.GData.Extensions.Where("", "",
txtLocation.text)

Dim postUri As New Uri(URI_USER_CALENDARS)
Dim CreatedCalendar As CalendarEntry
Try
    StatusImage(sImg.Google)
    CreatedCalendar = gService.Insert(postUri, NewGCalendar)
...

What is the expected output? What do you see instead?
I expect the calendar to be created...
Instead I Get
Google ResponseStream: [Line 4, Column 81, element gCal:hidden] Invalid
boolean value: 'False'

What version of the product are you using? On what operating system?
1.4.0.2 .NET
Visual Studio 2009 VB
XP SP3

Please provide any additional information below.
either the ' is not converted properly to the " ' " char or the string
version of the VB.NET "False" is not being dropped to lowercase as needed
by the XSD I don't know which is not happening but something is awry

Original issue reported on code.google.com by trspraypaint on 27 Jan 2010 at 9:07

GoogleCodeExporter commented 9 years ago
Same problem occurs for the CalendarEntry.Selected property. When setting 
either, 
the problem occurs.

Exception I received...

Execution of request failed: 
http://www.google.com/calendar/feeds/default/owncalendars/full?
gsessionid=ZRausjDGgsBTgDCflc9jLQ
"The remote server returned an error: (400) Bad Request."}  
System.Exception {System.Net.WebException}

Original comment by geoffvan...@hotmail.com on 31 Jan 2010 at 8:01

GoogleCodeExporter commented 9 years ago
I get the Response Stream By Following the directions in the Wiki "Error 
Handling"
http://code.google.com/p/google-gdata/wiki/ErrorHandling

which is what gave me the "[Line 4, Column 81, element gCal:hidden] Invalid
boolean value: 'False'"

try that method and see what it tells you...

I have not tracked down where the problem lies...

Original comment by trspraypaint on 31 Jan 2010 at 10:44

GoogleCodeExporter commented 9 years ago
I have no idea when that was fixed, but if you sync the code from subversion, 
what happens is that constants 
will be used instead of runtime conversion, and xsdtrue/false are defined as 
"true" and "false", so that problem is 
gone. 

Original comment by fman...@gmail.com on 1 Feb 2010 at 9:08

GoogleCodeExporter commented 9 years ago
I had this problem too. Using Wireshark, I found that the server did not want 
me to
set a color : the message for the 400 Bad Request was bad color #FFB622

Not setting the color and the 400 Bad Request disappeared.

Original comment by matthieu...@gmail.com on 16 Feb 2010 at 8:51

GoogleCodeExporter commented 9 years ago
@matthieu

http://code.google.com/apis/calendar/data/2.0/reference.html#gCalcolor

Original comment by trspraypaint on 16 Feb 2010 at 1:06

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
Source... you will have to compile the whole API Lib to work with the updated 
API's 

Original comment by trspraypaint on 13 Mar 2010 at 7:11

GoogleCodeExporter commented 9 years ago
DoH! You have to use ONLY the colors they have set forth in the reference 
guide... I
ended up making my own Color Picker Control 

Original comment by trspraypaint on 13 Mar 2010 at 7:14

GoogleCodeExporter commented 9 years ago
I just downloaded the latest DLL from SVN; dated February 15th 2010; the source 
is no 
where near that date, still kind of old.  Checked the Debug folder as well and 
they 
are the same date.

Using C#, this error is still occurring when setting

calendar.Hidden = false;

Original comment by ken.j.da...@gmail.com on 13 Mar 2010 at 7:22

GoogleCodeExporter commented 9 years ago
I will review this again, maybe the fix got overridden.

Original comment by fman...@gmail.com on 16 Mar 2010 at 12:39

GoogleCodeExporter commented 9 years ago
I just tried. I modified CalendarOwnCalendarsTest in caltest.cs to not only set 
hidden to false, but to then set it to 
true and update. Works just fine, sending the right set of strings over the 
wire. I can only imagine that you are 
using old versions of the DLL that still have the bug. 

Original comment by fman...@gmail.com on 24 Mar 2010 at 10:08