Re: [fpc-pascal] fpreport rangeerrors with TFPReportColor

2018-02-24 Thread Michael Van Canneyt
On Sat, 24 Feb 2018, Andreas Frieß wrote: Depending on the Information of the list here i have created some patches and an Bug-Report https://bugs.freepascal.org/view.php?id=33217 The heats of my changes is a more typesafe conversion and to use QWord for the JSON. So nothing is broken and

Re: [fpc-pascal] fpreport rangeerrors with TFPReportColor

2018-02-24 Thread Andreas Frieß
Depending on the Information of the list here i have created some patches and an Bug-Report https://bugs.freepascal.org/view.php?id=33217 The heats of my changes is a more typesafe conversion and to use QWord for the JSON. So nothing is broken and it rangechecksafe now. - a small snippet

Re: [fpc-pascal] fpreport rangeerrors with TFPReportColor

2018-02-21 Thread Michael Van Canneyt
On Thu, 22 Feb 2018, Andreas Frieß wrote: Another possible Problem with the definition TFPColor (fpc)  record with word <> TColor (lazarus) -$7FFF-1..$7FFF <> TFPReportColor (fpreport) UInt32 So you cannot use in Lazarus the 'well known' TColors. With TColor it is also Delphi

Re: [fpc-pascal] fpreport rangeerrors with TFPReportColor

2018-02-21 Thread Andreas Frieß
Another possible Problem with the definition TFPColor (fpc)  record with word <> TColor (lazarus) -$7FFF-1..$7FFF <> TFPReportColor (fpreport) UInt32 So you cannot use in Lazarus the 'well known' TColors. With TColor it is also Delphi compatible. If the defines are Lazarus

Re: [fpc-pascal] fpreport rangeerrors with TFPReportColor

2018-02-21 Thread Michael Van Canneyt
On Wed, 21 Feb 2018, Mattias Gaertner wrote: On Wed, 21 Feb 2018 19:54:55 + Graeme Geldenhuys wrote: [...] > Because UInt32 is not a JSON dataformat. Well, then I'll say that FPC's JSON needs to be extended to support UInt32, as it is a perfectly valid

Re: [fpc-pascal] fpreport rangeerrors with TFPReportColor

2018-02-21 Thread Mattias Gaertner
On Wed, 21 Feb 2018 19:54:55 + Graeme Geldenhuys wrote: >[...] > > Because UInt32 is not a JSON dataformat. > > Well, then I'll say that FPC's JSON needs to be extended to support > UInt32, as it is a perfectly valid Object Pascal data type. How should

Re: [fpc-pascal] fpreport rangeerrors with TFPReportColor

2018-02-21 Thread Graeme Geldenhuys
On 2018-02-21 08:48, Andreas Frieß wrote: The definition is TFPReportColor  = type UInt32; That was designed and defined to handle AARRGGBB values of $ (max 256 for each color channel and alpha), and that fits perfectly in a UInt32 data type. Should the definition for

Re: [fpc-pascal] fpreport rangeerrors with TFPReportColor

2018-02-21 Thread Andreas Frieß
Andreas Frieß wrote: > when i compile in Lazarus the Reportdesigner with activated > RangeCheck it gives a lot of runtimeerror with rangeerrors. > For explanation what i mean in my previous post, UInt32 is not an integer or JSON compatible size (and actual rangecheck unsafe). ANdreas

[fpc-pascal] fpreport rangeerrors with TFPReportColor

2018-02-21 Thread Andreas Frieß
when i compile in Lazarus the Reportdesigner with activated RangeCheck it gives a lot of runtimeerror with rangeerrors. The definition is TFPReportColor  = type UInt32; Loading and saving in JSON is done by function ReadInteger(AName: String; ADefault: Integer): Integer; override; function