User Changes 2.2.4
From Free Pascal wiki
About this page
Below you can find a list of intentional changes between the the 2.2.2 release and the 2.2.4 release which can change the behaviour of previously working code, along with why these changes were performed and how you can adapt your code if you are affected by them.
All systems
Default property values
- Old behaviour: Published properties without a specified default were not streamed under certain circumstances.
- New behaviour: Such properties are now treated as if they had nodefault specified. This means that some extra properties will now be streamed in such cases:
- Boolean fields with the value false
- enumerated types with the ordinal value 0
- Example:
<delphi> type
tenum = (ea,eb,ec); tc = class private fmybool: boolean; fenum: tenum; published property mybool read fmybool write fmybool; property enum read fenum write fenum; end;
var
c: tc;
begin
c:=tc.create; // write c to a stream
end. </delphi> In earlier versions, mybool nor enum would be written to the stream in this case, while now they will be.
- Reason: Delphi compatibility.
- Remedy: Adapt your streaming code to take this change into account.