[Lazarus] Lazarus tooltips do not work properly in Indy10 on Unix

Bo Berglund bo.berglund at gmail.com
Fri Oct 26 10:54:04 CEST 2018


I discovered a strange IDE issue concerning the tooltips in Lazarus
when using TIdFTP objects from Indy10.
I have made two installations of Lazarus 1.8.4 + FPC 3.0.4, one on
Windows7 and one in IUbuntu 18.04.
I am working on a project ported from Delphi 2007 which uses Indy10.
So in both IDE:s I have used the IndyLaz package (installed it via
OnLine PackageManager).

In both environments the project builds OK, no errors or warnings, but
in the Lazarus IDE there are differences:

Windows version:
----------------
If I type the name of a TIdFTP variable and wait a few seconds to get
it highlighted, then type the period, the tooltips pop up with the
possible methods I can use. This is expected and useful.

Ubuntu Linux x64 version:
-------------------------
If I do the same in this environment nothing pops up, instead there is
an error message in the messages panel:

Codetools, Errors: 1
IdGlobal.pas(1889,105) Error: expected ;, but deprecated found

So I opened the iundicated line by clicking on the error message and
got to this:

{$IFDEF UNIX} 
  GOffsetFromUTC: TDateTime = 0{$IFDEF HAS_DEPRECATED}{$IFDEF
USE_SEMICOLON_BEFORE_DEPRECATED};{$ENDIF} deprecated{$ENDIF};
{$ENDIF}

Apparently this line, which does not even exist on Windows breaks the
tooltips in Lazarus without breaking the compiler 3.0.4.

I have now tested a number of variations of this line without success:

GOffsetFromUTC: TDateTime = 0 deprecated;
==> IdGlobal.pas(1890,33) Error: expected ;, but deprecated found

GOffsetFromUTC: TDateTime = 0; deprecated;
==> IdGlobal.pas(1896,3) Error: expected end., but IndyPos found

except:

GOffsetFromUTC: TDateTime = 0;
==> This actually works in the IDE to bring up the IdFTP methods
tooltips!

And the project builds without any errors or warnings related to this,
just warns about variables that are not used in my own code. They
should be ifdef:ed for DELPHI...

I asked Remy Lebeau about this and he suggested I report this on the
Lazarus list since he has had debates before on this very issue...
Why is there a construct like that in the IdGlobals file in the first
place???

Lazarus without tool-tips for complex classes like this is no good.


-- 
Bo Berglund
Developer in Sweden



More information about the Lazarus mailing list