Re: [Lazarus] How to stream TColor in hexadecimal format?
Thanks, it does not work. Where should I place such overloaded procedure? The reason I need it is that the *.xml file is config file so there is a chance that someone will edit it manually. Or there is possibility to change declaration from TColor to string. V. __ Od: Mattias Gaertner nc-gaert...@netcologne.de Komu: lazarus@lists.lazarus.freepascal.org Datum: 14.04.2015 02:09 Předmět: Re: [Lazarus] How to stream TColor in hexadecimal format? Maybe you can overload RegisterIntegerConsts(TypeInfo(TColor), TIdentToInt(@IdentToColor), TIntToIdent(@ColorToIdent)); with your own functions and write colors as h00FEDCBA. Mattias -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
[Lazarus] How to stream TColor in hexadecimal format?
Hello, how to stream TColor in hexadecimal format? Currently, TColor is streamed as Color = 5810431 Color = clTeal in *.lfm or integer name=ClrDWBCurve value=33023/ ident name=ClrSF2Curve value=clRed/ in *.xml. How can I stream it in $00FEDCBA format? In the worst case, I probably can move those properties from published to public and TPersistent.DefineProperties. Will it work? Or is there some more elegant way? Thanks for help, V. -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] How to stream TColor in hexadecimal format?
On Mon, 13 Apr 2015 23:49:50 +0200 Vojtěch Čihák vojtech.ci...@atlas.cz wrote: [...] how to stream TColor in hexadecimal format? Currently, TColor is streamed as Color = 5810431 Color = clTeal in *.lfm or As far as I know the underlying TAbstractObjectWriter does not support hexadecimal. integer name=ClrDWBCurve value=33023/ ident name=ClrSF2Curve value=clRed/ in *.xml. How can I stream it in $00FEDCBA format? In the worst case, I probably can move those properties from published to public and TPersistent.DefineProperties. Will it work? No, because that uses TAbstractObjectWriter too. Or is there some more elegant way? Maybe you can overload RegisterIntegerConsts(TypeInfo(TColor), TIdentToInt(@IdentToColor), TIntToIdent(@ColorToIdent)); with your own functions and write colors as h00FEDCBA. Mattias -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus