Re: [fpc-pascal] googleapi package, TCalendarListResource.List, unhandled exception

2016-08-21 Thread Michael Van Canneyt



On Fri, 19 Aug 2016, Lubos Pintes wrote:


Hello,
I am not sure if this is useful or not. After some fiddling with compiler 
options, I was able to generate full line trace of exception I obtain when I 
try to call the TCalendarListResource.List method.
I logged the requests, so I can confirm that the request is issued, and data 
are retrieved correctly. But after that, this exception is raised on the 
method call line:

An unhandled exception occurred at $00458D0E:
ERESTAPI: TCalendarList: unsupported array element type :
 $00458D0E  TBASEOBJECT__SETARRAYELEMENTS,  line 717 of 
fpcsrc/packages/fcl-web/src/base/restbase.pp
 $004591C0  TBASEOBJECT__SETARRAYPROPERTY,  line 799 of 
fpcsrc/packages/fcl-web/src/base/restbase.pp
 $0045B0B4  TBASEOBJECT__LOADPROPERTYFROMJSON,  line 1310 of 
fpcsrc/packages/fcl-web/src/base/restbase.pp
 $0045B361  TBASEOBJECT__LOADFROMJSON,  line 1348 of 
fpcsrc/packages/fcl-web/src/base/restbase.pp
 $0045729E  TGOOGLEAPI__SERVICECALL,  line 485 of 
fpcsrc/packages/googleapi/src/googleservice.pp
 $004569EF  TGOOGLERESOURCE__SERVICECALL,  line 350 of 
fpcsrc/packages/googleapi/src/googleservice.pp
 $00426F93  TCALENDARLISTRESOURCE__LIST,  line 987 of 
fpcsrc/packages/googleapi/src/googlecalendar.pp

 $00401D00  main,  line 90 of a.dpr

I tested it against freshly built FPC, I built it today.


Did you call RegisterAPIResources ?

  // Register calendar resources.
  TCalendarAPI.RegisterAPIResources;

Michael.
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal


Re: [fpc-pascal] googleapi package, TCalendarListResource.List, unhandled exception

2016-08-21 Thread Lubos Pintes

Hello Michael,
Yes, I called that method.
Dňa 21. 8. 2016 o 10:59 Michael Van Canneyt napísal(a):



On Fri, 19 Aug 2016, Lubos Pintes wrote:


Hello,
I am not sure if this is useful or not. After some fiddling with
compiler options, I was able to generate full line trace of exception
I obtain when I try to call the TCalendarListResource.List method.
I logged the requests, so I can confirm that the request is issued,
and data are retrieved correctly. But after that, this exception is
raised on the method call line:
An unhandled exception occurred at $00458D0E:
ERESTAPI: TCalendarList: unsupported array element type :
 $00458D0E  TBASEOBJECT__SETARRAYELEMENTS,  line 717 of
fpcsrc/packages/fcl-web/src/base/restbase.pp
 $004591C0  TBASEOBJECT__SETARRAYPROPERTY,  line 799 of
fpcsrc/packages/fcl-web/src/base/restbase.pp
 $0045B0B4  TBASEOBJECT__LOADPROPERTYFROMJSON,  line 1310 of
fpcsrc/packages/fcl-web/src/base/restbase.pp
 $0045B361  TBASEOBJECT__LOADFROMJSON,  line 1348 of
fpcsrc/packages/fcl-web/src/base/restbase.pp
 $0045729E  TGOOGLEAPI__SERVICECALL,  line 485 of
fpcsrc/packages/googleapi/src/googleservice.pp
 $004569EF  TGOOGLERESOURCE__SERVICECALL,  line 350 of
fpcsrc/packages/googleapi/src/googleservice.pp
 $00426F93  TCALENDARLISTRESOURCE__LIST,  line 987 of
fpcsrc/packages/googleapi/src/googlecalendar.pp
 $00401D00  main,  line 90 of a.dpr

I tested it against freshly built FPC, I built it today.


Did you call RegisterAPIResources ?

  // Register calendar resources.
  TCalendarAPI.RegisterAPIResources;

Michael.
___
fpc-pascal maillist  -
fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal




___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal