[fpc-devel]Override Default Value of Property
jueca at brturbo.com
Sun Oct 5 23:04:27 CEST 2003
It's posibile to override the default value of a property???
TClassA = class
property Int: Integer read FInt write FInt default 0;
TClassB = class(TClassA)
property Int default 5;
when writing out a TClassA object, the property Int will only be writed if "Int <> 0", the same to a TClassB object, that should (?) write only if "Int <> 5"....
property Int default 5; compiles but has no effect, it's a bug????
PS: I know that I can do it with "stored"... but I think that to override property's default value should work...
PPS: I'm using fpc 1.0.10 with -S2
More information about the fpc-devel