- edited description
Handling of properties that are missing from DFM
In some cases a published property will not be written to the DFM because the stored storage specifier directive evaluates to False.
https://docwiki.embarcadero.com/RADStudio/Sydney/en/Properties_(Delphi)#Storage_Specifiers
For example if the value of TField
's DisplayLabel
property equals the value of the FieldName
property then the DisplayLabel
property will not be written to the DFM. As a result of this the DisplayLabel
value can not be translated.
Proposed solution
To work around this problem we should introduce functionality that will synthesize property Name/Value pairs in case a property is missing from the DFM. This should happen after all the properties of a component or collection item has been parsed (see: TModuleDFMResourceProcessor.ReadComponent
and TModuleDFMResourceProcessor.ReadCollection
).
The logic that controls this functionality can be based on a customizable set of rules. The rules can take the form:
Element type | Property name | Property value | ||
---|---|---|---|---|
Meaning | Regular expression specifying the element (component) type name. | Name of the required property. | Value to assign the property. Can specify literal value or the name of another property to copy the value from. | |
Example rule | T.*Field | DisplayLabel | @FieldName | |
Example rule match | TIntegerField | DisplayLabel | Count |
Comments (4)
-
reporter -
reporter - changed status to open
-
reporter - changed status to resolved
Fixes
#25Properties that has been omitted from the DFM due to defaulting or the "stored" storage specifier can now be synthesized based on on a configurable set of rules.→ <<cset 8debad1ce3ec>>
-
reporter Refs
#25Fixes for resource module incorrect property injection.→ <<cset 234a99f79fde>>
- Log in to comment