On Mon, 13 Apr 2015 23:49:50 +0200 Vojtěch Čihák <[email protected]> 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 [email protected] http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
