Recent

Author Topic: rxDBVerticalGrid var error and rxDBGrid  (Read 2870 times)

zyzmo

  • New Member
  • *
  • Posts: 41
    • My Website
rxDBVerticalGrid var error and rxDBGrid
« on: November 29, 2017, 05:04:00 pm »
Hello!

I was trying install rxLib into a new computer, though, two errors were driving me nuts!

First:
At rxdbverticalgrid the compiler was showing erros on varCellPadding variable! So then I changed lines 356 to 359;

then:
Code: Pascal  [Select][+][-]
  1. {$IFDEF lcl_version<'1.9.0.0'}
  2.   varCellPadding : integer = 2;
  3. {$ENDIF}

now:
Code: Pascal  [Select][+][-]
  1. var
  2. {$IFDEF lcl_version<'1.9.0.0'}
  3.   varCellPadding : integer = 2;
  4. {$ELSE}
  5.   varCellPadding : integer = 0;
  6. {$ENDIF}

by here it works well.

Into rxdbgrid unit, I fount an error in the line 4013... that line uses a function called  CheckDisplayMemo but I didn't found that anywhere unless in the 4370th line! BUT it is commented! So I just wrote a dummy verification  like ( 1 + 1 ) = 2 ...

Thats all!

Thx!

« Last Edit: November 29, 2017, 06:06:26 pm by zyzmo »
<!-- Requirement Engineer -->

wp

  • Hero Member
  • *****
  • Posts: 11858
Re: rxDBVerticalGrid var error and rxDBGrid
« Reply #1 on: November 29, 2017, 06:49:06 pm »
At rxdbverticalgrid the compiler was showing erros on varCellPadding variable
Code: Pascal  [Select][+][-]
  1. {$IFDEF lcl_version<'1.9.0.0'}
  2.   varCellPadding : integer = 2;
  3. {$ENDIF}
I added varCellPadding to the standard LCL unit grids to take care of LCL scaling of the inner border of grid cells, it extends the old "constCellPadding". This happened in Laz trunk, i.e. v1.9.0.0. It seems that the author of rx wants to make this variable available in older versions also.

This is fine, but the syntax is not correct in my opinion. I've never used an IFDEF together with an expression. The $IF works correctly, however, but you must use the symbol lcl_fullversion (from unit lclversion) which is lcl_fullversion = ((lcl_major *  100 + lcl_minor) * 100 + lcl_release) * 100 + lcl_patch, i.e 1090000 for version 1.9. The directive, therefore, should be

{$if lcl_fullversion < 1090000}
  varCellPadding: Integer = 2;
{$endif}

 

TinyPortal © 2005-2018