Typecasting has been left out of the java examples for some reason, but I've
never seen them work without it.
As far as I know you will have to cast myEntry to BaseEntry like so:
EventEntry insertedEntry = myService.insert(postUrl,(BaseEntry) myEntry);
On 7/21/06, Andy <andr...@gmail.com> wrote:
I have been trying out the Java Client Libary attempting to write to
GCal, but I've been unsuccessful at getting rid of a build error
"incompatible types" in the last line below.
EventEntry myEntry = new EventEntry();
URL postUrl = new
URL("http://www.google.com/calendar/feeds/andxx...@gmai...@
");
EventEntry insertedEntry = myService.insert(postUrl, myEntry);
I get:
found : com.google.gdata.data.BaseEntry
required: com.google.gdata.data.extensions.EventEntry
EventEntry insertedEntry = myService.insert(postUrl, myEntry);
^
1 error
(The ^ is under postUrl)
When I look at the GoogleService class, the parameter types match what
I'm sending. The only thing I can imagine is that it might be confusing
the EventEntry type with it's parent type BaseEntry.
I have no experience with Java (I wish the Client Library were
available in Python). Can anyone see anything missing? Or is there
something wrong with the client library? Any insight would be most
appreciated.