Recent

Author Topic: GoogleApi Drive Example - Doesn't compile  (Read 8321 times)

Frank

  • Jr. Member
  • **
  • Posts: 69
GoogleApi Drive Example - Doesn't compile
« on: September 14, 2016, 08:58:48 pm »
Hi,
  I am unable to get Googleapi demo "drivedemo.lpi" to compile.

  Details:
    OS : Win7 64 bit
    FPC    : svn trunk 3.1.1 64 bit revision 34525
    Lazarus : svn trunk 1.7 64 bit revision 52969

  Errors:
    "frmmain.pp(129,13) Error: identifier idents no member "DownloadUrl"" of TFile
    "frmmain.pp(130,18) Error: identifier idents no member "exportLinks"" of TFile
    "frmmain.pp(148,51) Error: identifier idents no member "Title"" of TFile
    "frmmain.pp(372,39) Error: identifier idents no member "createdDate"" of TFile
    "frmmain.pp(374,35) Error: identifier idents no member "Editable"" of TFile
    "frmmain.pp(375,25) Error: identifier idents no member "fileSize" of TFile
    "frmmain.pp(376,25) Error: identifier idents no member "lastModifyingUserName""of TFile

    "frmmain.pp(256,7) Error: identifier idents no member "maxResults"" of TFilesListOptions
    "frmmain.pp(258,7) Error: identifier idents no member "projection"" of TFilesListOptions

    "frmmain.pp(266,36) Error: identifier idents no member "items" of TFileList

Any ideas ? What am I doing wrong?

Thanks, Frank

Frank

  • Jr. Member
  • **
  • Posts: 69
Re: GoogleApi Drive Example - Doesn't compile
« Reply #1 on: September 16, 2016, 10:57:27 pm »
All... After several days of digging this is what I have found out...

1/ Fpc source for googleapi has gone foreward & the demos have not been updated. Not
    a big issue, 'items' to 'files' in TFileList, 'Title' to 'name' in TFile... similar, just different.

2/ minor issues in frmmain with vars not initialized.

3/ Fpc 3.1 fcl-web restbase.pp TBaseObject.SetObjectProperty errors :
      a/ dynamic set 'files' array fails...
          temp fix : coded to use fpc-2.6.4 version code in both googledrive.pp & restbase.pp
      b/ AP, ET, AN vars fail to aquire TFile array...
          TEMP fix hard coded : "ET^.Kind = tkClass"
                               From
                                 TObjectArray(AP):= CreateObject(AN);
                              To
                                 TFileList(Self).files:= TFile.Create;

  The googledrive demo now works (for me), but this is NOT a solution for "restbase.pp".
I will continue to work at it, but my level of understanding of RTTI & FPC-3.1 are, unfortunately,
not great...

Frank


guest61674

  • Guest
Re: GoogleApi Drive Example - Doesn't compile
« Reply #2 on: December 17, 2017, 07:00:17 pm »
 :'(

No one can work on this fix?



Portuguese:
Ninguém pode trabalhar nessa correção?

Tradução correta?

guest61674

  • Guest
Re: GoogleApi Drive Example - Doesn't compile
« Reply #3 on: December 18, 2017, 02:45:27 pm »
up

molly

  • Hero Member
  • *****
  • Posts: 2330
Re: GoogleApi Drive Example - Doesn't compile
« Reply #4 on: December 18, 2017, 03:17:25 pm »
In case you have discovered an error/bug and it is reproducible _and_ you wish for it to be fixed then you should file a bug-report on mantis.

guest61674

  • Guest
Re: GoogleApi Drive Example - Doesn't compile
« Reply #5 on: December 18, 2017, 10:24:36 pm »

wp

  • Hero Member
  • *****
  • Posts: 11853
Re: GoogleApi Drive Example - Doesn't compile
« Reply #6 on: December 18, 2017, 10:50:17 pm »
You probably have not done this before. No problem, but I should explain the correct procedure:
  • The report should be self-contained. You link to this discussion. This is fine as an addendum, but all the description should be in the report. Unfortunately you cannot edit your own report (when will this ever be fixed?), so just add new notes.
  • Normally you should add a demo project (*.pas, *.lfm, *.lpr, *.lpi files packed to a single .zip) which explains the error and can be used as a test vehicle by the reviewer. Of course, this is not required here - the demo project comes along with Lazarus, but from the report alone it is not clear which demo is not working.
  • Since you found a solution you should submit a patch. For this you need the development version of Lazarus (trunk, use svn), and you create a patch file as described here. Upload the patch file to the bugtacker.

guest61674

  • Guest
Re: GoogleApi Drive Example - Doesn't compile
« Reply #7 on: December 19, 2017, 12:06:28 am »
I did not find a solution.

simone

  • Hero Member
  • *****
  • Posts: 573
Re: GoogleApi Drive Example - Doesn't compile
« Reply #8 on: December 31, 2018, 08:22:31 am »
I have similar problems in order to compile GoogleApi Drive Example... In particular the demo uses properties / methods of TFile (in Googledrive unit) that are undefined... Thanks Frank suggestions I have been hable to solve only some issues. Has someone updated examples/docs of Google APIs? Thanks in advance.
Microsoft Windows 10 64 bit - Lazarus 3.0 FPC 3.2.2 x86_64-win64-win32/win64

Thaddy

  • Hero Member
  • *****
  • Posts: 14197
  • Probably until I exterminate Putin.
Re: GoogleApi Drive Example - Doesn't compile
« Reply #9 on: December 31, 2018, 10:18:07 am »
It is enough to add simply googledrive.pp to the uses clause, although I do not use Lazarus with googledrive it may be that the design component is broken..
Specialize a type, not a var.

simone

  • Hero Member
  • *****
  • Posts: 573
Re: GoogleApi Drive Example - Doesn't compile
« Reply #10 on: December 31, 2018, 11:43:23 am »
Thanks Thaddy. Googledrive unit is already in uses clause of frmmain, where the compiler error arises.
Lazgoogleapis is a nice component. I hope it will not be abandoned.   
Microsoft Windows 10 64 bit - Lazarus 3.0 FPC 3.2.2 x86_64-win64-win32/win64

Thaddy

  • Hero Member
  • *****
  • Posts: 14197
  • Probably until I exterminate Putin.
Re: GoogleApi Drive Example - Doesn't compile
« Reply #11 on: December 31, 2018, 11:46:35 am »
No. It is part of the distribution and as long as google supports it it will probably be supported.
I will give you a console example tomorrow. Today too busy with tonight.
Specialize a type, not a var.

simone

  • Hero Member
  • *****
  • Posts: 573
Re: GoogleApi Drive Example - Doesn't compile
« Reply #12 on: December 31, 2018, 01:00:07 pm »
Thanks. I need a starting point to build my own lightweigh client for Google Drive. I think the example Is very useful for this purpose. A side question: for Google Maps integration, should I use the third party  component TMapViewer?
« Last Edit: December 31, 2018, 01:47:57 pm by simone »
Microsoft Windows 10 64 bit - Lazarus 3.0 FPC 3.2.2 x86_64-win64-win32/win64

Vingadero

  • New Member
  • *
  • Posts: 44
Re: GoogleApi Drive Example - Doesn't compile
« Reply #13 on: February 19, 2021, 08:54:42 pm »
Thanks. I need a starting point to build my own lightweigh client for Google Drive. I think the example Is very useful for this purpose. A side question: for Google Maps integration, should I use the third party  component TMapViewer?

Hello simone,

Sorry for reopen this old post.. but I'm having the same issues to compile this demo.

Code: Pascal  [Select][+][-]
  1. frmmain.pp(128,13) Error: identifier idents no member "downloadUrl"
  2. ... and go on
  3.  

In uses already have: googledrive, googlebase, googleservice, googleclient

I'm using:
Lazarus 2.0.10
FPC: 3.2.0

How u able to solve this?

Best regards,

jus

  • New Member
  • *
  • Posts: 26
Re: GoogleApi Drive Example - Doesn't compile
« Reply #14 on: February 24, 2021, 02:24:52 am »
@Vingadero

Maybe you should ask this question in the freepascal mailing list. One of the expert there is Michael van Canneyt.

Some time ago I had some problems to compile google spreadsheet and I got some help there in the mailing list.

If you get some progress there, please let us know.  ;)
« Last Edit: February 24, 2021, 03:11:58 am by jus »

 

TinyPortal © 2005-2018