This topic covers the implementation details of TqppLanguages.
Scope: cpLanguages.pas; class derived from TBtnEditProperty. Prepared from the curated implementation supplied for this review on 2 October 2026.
Language id attributes are list positions, while element text contains language database IDs. The reader searches consecutive positions starting at 1 and stops at the first missing entry. List capacity depends on MaxNumLanguages, whose definition was not supplied.
Notation and shared helper rules: Reading this reference.
Literal rec_type values emitted within these routines: TLanguageIdList. Nested values may belong to child wrappers rather than this owner itself; the attribute entries below give their exact locations.
Inherited implementation: TBtnEditProperty. Follow it when the ordered behavior invokes inherited methods; inherited fields are not repeated as locally owned fields.
Exact XML fields and attributes
The paths below start at this record or property node. A slash identifies a child element; @ identifies an attribute. Curly braces mark a variable index or expression, not literal XML text. Initial values describe initialization; they do not establish what an omitted individual element does. The Implementation toggle below contains the supplied routines for exact branch order and conversions.
ListLanguages/Language[@id={i.toString}]
XML representation: The text of the Language[@id={i.toString}] element.
Reading: Converts the stored text to a number and assigns it to aPropValue.ListLanguages[i] when the record node exists; for each i from low (TLanguageIdList) through high (TLanguageIdList); node2 exists.
Writing: Stores the text representation of curLangID when for each i from low (TLanguageIdList) through high (TLanguageIdList); (curLangID is greater than 0 or i is low (TLanguageIdList)).
ListLanguages/@rec_type
XML representation: The rec_type attribute.
Writing: Stores the literal text “TLanguageIdList” whenever the writer reaches this field.
ListLanguages/Language/@id
XML representation: The id attribute.
Writing: Stores the text representation of i when for each i from low (TLanguageIdList) through high (TLanguageIdList); (curLangID is greater than 0 or i is low (TLanguageIdList)).
Initialization and reset values
TqppLanguages.Create
Setting or temporary variable |
Initial value |
When it is assigned |
PropName |
“Languages” |
Always |
Required |
1 |
Always |
PropValue.PropertyType |
ptListLanguages |
Always |
PropValue.ListLanguages |
Default (TLanguageIdList) |
Always |
PropValue.ListLanguages[1] |
IniSettings.DefaultLanguage |
UseIniSettingsInPropertyConstructor is true |
DataValue |
PropValue |
Always |
This routine also calls inherited Create; self.FillDisplayValue. See Implementation for their order and any conditional calls.
Storage declarations relevant to interpretation
These are in-memory member and property types, not a list of mandatory XML children. They retain array bounds, fixed buffers and selector types. The field reference above defines what is actually serialized.
The Implementation toggle contains only TqppLanguages methods. Initializers and helpers belonging to other types are identified separately below. Shared XML-helper limitations are explained in Reading this reference.