[Lazarus] range check errors in LCL packages

Sven Barth pascaldragon at googlemail.com
Thu Sep 13 10:06:01 CEST 2012

Am 12.09.2012 23:38, schrieb Mattias Gaertner:
>> eg:  Try to compile LCL-GTK2 with -CRrt enabled.
>> /home/graemeg/devel/lazarus/lcl/interfaces/gtk2/gtk2wsbuttons.pp(237,35)
>> Error: Class or Object types "TCustomBitBtn" and "TWinControlAccess" are
>> not related
> That's the old style class helper. Not usable with -CT.

Since Lazarus requires 2.6.0 anyway one could change that to use normal 
class helpers:

   TWinControlHelper = class helper for TWinControl
     function GetWinControlFlags: TWinControlFlags; inline; // I hope 
inline works in that case, if not one might consider it as a bug and 
report it :)

function TWinControlHelper.GetWinControlFlags: TWinControlFlags;
   Result := FWinControlFlags;

And then where TWinControlAccess was used:

if not (wcfInitializing in ABitBtn.GetWinControlFlags) and BuildNeeded then

Note: The code was not tested, but it *should* work.


More information about the Lazarus mailing list