Google Authentication, Google Drive and Delphi?

Google Authentication, Google Drive and Delphi?

I am looking for Delphi code samples related to authentication and access to documents on Google Drive.

To be specific, I’d like to be able to

– log on with Google+ credentials

– Do like Google Forms and submit entries, one line at a time, to a Google Sheet document

– Retrieve the specific sheet document on Google Drive

Any other component packs or source samples out there, besides TMS Cloud Pack?

The non-debuggable unit

The non-debuggable unit

I have a unit that now refuses to have blue dots when compiling.  Doesn’t matter if it is in debug or release mode.  

– It is referenced in .dpr file

– I’ve searched all paths for stray .DCUs and found none

– I’ve have deleted .dcr, .local and .identcache files 

– I’ve done Clean and Build, and still no blue dots and breakpoints

Once running, I can set breakpoints, but some lines will not accept them (such as in multiline statements)

 

Yesterday I found an interesting issue.

Yesterday I found an interesting issue.

A lazy instanced shared object is declared in the implementation section of a unit A and protected by an access function which use a critical section to avoid double creation.  The critical section was instantiated in the initialization section of Unit A.  The ClassA types call the shared function during instantiation.

unit A references units X, which use unit B, that defines ClassB as a descendant from ClassA in unit A.

In Unit B, I added instantiation of a ClassB in the initialization section.

Boom!

Unit A’s init section had not been called before Unit B’s init section!

The critical section object was nil!

This has to be a bug, or?

I solved it by putting the critical section into a different shared unit used by both A and B.

Frames are great for isolating code, but nested frames and frame reuse has issues.  What am I doing wrong?

Frames are great for isolating code, but nested frames and frame reuse has issues.  What am I doing wrong?

The frames:

frmValidation – 

a small toolbar with a message box and Save/Cancel buttons

frmDetailProperties – has a frmValidation embedded

frmMasterProperties – has a frmValidation embedded

frmDetailList has a list and the frmDetailProperties embedded

frmMasterList has a list and the frmMasterProperties and a frmDetailList embedded.

Initially, I had a problem with the frmValidation instances having the same name on the two properties forms – and Delphi complained about Duplicates not allowed.  Renaming one, solved that issue.

All frames have been added to the palette, and when I have the project open, I have no problems with viewing the combined frames. The frame source is in the project path.

The problem: If I close Delphi and start again, Delphi complains that it can’t find the TfrmDetailProperties in frmMasterList.  I click cancel, the project opens, but the frmMasterList can’t be viewed.  

If I now close the frmMasterList unit – and reopen it, it opens without any messages, and the frame can now be correctly viewed. 

What is going on here?

Anyone here that have experience with Delphi and Continua / FinalBuilder / svn / git / Jira, and would care to share…

Anyone here that have experience with Delphi and Continua / FinalBuilder / svn / git / Jira, and would care to share their opinion of the product?

We are more or less set on investing in Continua CI and Finalbuilder for our shop.

We had a look at Jenkins and TeamCity as well, but it was CCI/FB which came out on top as best match for our wish list, but we have really only scratched the surface with the three.

Feedback appreciated.

http://www.finalbuilder.com/continua-ci.aspx

Enum declaration with subrange bounds violation?

Enum declaration with subrange bounds violation?

type

  {$MINENUMSIZE 2}

  TMyEnum2 = (

    Enum11 = 1,

    Enum12 = 2,

    Enum13 = 3,

    Enum1Mid1 = $7fff,  // No warning

    Enum1Mid2 = $8000,  // No warning

    Enum1Max  = $ffff); // No warning

  {$MINENUMSIZE 4}

  TMyEnum4 = (

    Enum21 = 1,

    Enum22 = 2,

    Enum23 = 3,

    Enum2Mid1 = $7fffffff,  // No warning

    Enum2Mid2 = $80000000,  // Warning

    Enum2Max  = $ffffffff); // Warning

The two last entries in the second type declaration above, gives a warning: W1012 Constant expression violates subrange bounds.

Any known QC issue or workaround for this?

Any reason that the enum can’t use the most signficant bit in a 4 byte size enum?

WiFi Network connectivity status – best method to check if offline?

WiFi Network connectivity status – best method to check if offline?

I have an app running on a Winows PC on a warehouse truck, which roams the halls of dairy products.  Some corners of these dark and secluded halls can have iffy WiFi coverage, and I need to have an idea about if I am connected or not – and preferably I’d like to know before I try a database operation and get a time out.

I have a Windows Server on the other end, and I have a running Window Service that can do IP connections.

Q: What method would you use to keep track of the WiFi connection Status?