This topic covers the implementation details of TSaintsOptions.
Scope: cpSaintsOptions.pas; class derived from TBtnEditProperty. Prepared from the curated implementation supplied for this review on 2 October 2026.
There is one SaintsOptions node per TqHolList letter. default_vals=true invokes ResetToDefaults and skips the other fields. With false, the reader reads the explicit fields, some through string accessors.
Implementation question: TSaintsOptionsRec.IsDefault and ResetToDefaults do not include IntraHolSep, although the nondefault XML branch persists it. A change to that field alone may be suppressed by the default marker.
Notation and shared helper rules: Reading this reference.
Literal rec_type values emitted within these routines: TSaintsOptionsRec. 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.
Structures used directly by this XML implementation:
TSaintsOptionsRec (supporting record documented below).
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.
SaintsOptions[@TqHolList={s}]/default_vals
XML representation: The text of the default_vals element.
Reading: Reads the element into aPropValue.stndOptions.UseDefaultVals when for each iHolList from qhlA through qhlU; the record node exists. Before this read, aPropValue.stndOptions.UseDefaultVals is set to false.
Writing: Stores the literal text “true” when for each iHolList from qhlA through qhlU; St[iHolList].IsDefault is true.
Writing: Stores the literal text “false” when for each iHolList from qhlA through qhlU; the following is false: St[iHolList].IsDefault is true.
SaintsOptions[@TqHolList={s}]/OverrideSaints
XML representation: The text of the OverrideSaints element.
Reading: Reads the element into aPropValue.stndOptions.St[iHolList].OverrideSaints when for each iHolList from qhlA through qhlU; the record node exists; UseDefaultVals is false.
Writing: Stores true or false according to St[iHolList].OverrideSaints when for each iHolList from qhlA through qhlU; the following is false: St[iHolList].IsDefault is true.
SaintsOptions[@TqHolList={s}]/SaintsSet
XML representation: The text of the SaintsSet element.
Reading: Reads the element into aPropValue.stndOptions.St[iHolList].SaintsSet when for each iHolList from qhlA through qhlU; the record node exists; UseDefaultVals is false.
Writing: Stores the numeric value of St[iHolList].SaintsSet when for each iHolList from qhlA through qhlU; the following is false: St[iHolList].IsDefault is true.
SaintsOptions[@TqHolList={s}]/Separator
XML representation: The text of the Separator element.
Reading: Reads the element into aPropValue.stndOptions.s when for each iHolList from qhlA through qhlU; the record node exists; UseDefaultVals is false. The subsequent conversion is shown in Implementation.
Writing: Stores St[iHolList].Separator when for each iHolList from qhlA through qhlU; the following is false: St[iHolList].IsDefault is true.
SaintsOptions[@TqHolList={s}]/Sorted
XML representation: The text of the Sorted element.
Reading: Reads the element into aPropValue.stndOptions.St[iHolList].Sorted when for each iHolList from qhlA through qhlU; the record node exists; UseDefaultVals is false.
Writing: Stores true or false according to St[iHolList].Sorted when for each iHolList from qhlA through qhlU; the following is false: St[iHolList].IsDefault is true.
SaintsOptions[@TqHolList={s}]/UseNamedays
XML representation: The text of the UseNamedays element.
Reading: Reads the element into aPropValue.stndOptions.St[iHolList].UseNamedays when for each iHolList from qhlA through qhlU; the record node exists; UseDefaultVals is false.
Writing: Stores true or false according to St[iHolList].UseNamedays when for each iHolList from qhlA through qhlU; the following is false: St[iHolList].IsDefault is true.
SaintsOptions[@TqHolList={s}]/UseHolSet
XML representation: The text of the UseHolSet element.
Reading: Reads the element into aPropValue.stndOptions.St[iHolList].UseHolSet when for each iHolList from qhlA through qhlU; the record node exists; UseDefaultVals is false.
Writing: Stores true or false according to St[iHolList].UseHolSet when for each iHolList from qhlA through qhlU; the following is false: St[iHolList].IsDefault is true.
SaintsOptions[@TqHolList={s}]/HolSet
XML representation: The text of the HolSet element.
Reading: Reads the element into aPropValue.stndOptions.St[iHolList].HolSet when for each iHolList from qhlA through qhlU; the record node exists; UseDefaultVals is false.
Writing: Stores the numeric value of St[iHolList].HolSet when for each iHolList from qhlA through qhlU; the following is false: St[iHolList].IsDefault is true.
SaintsOptions[@TqHolList={s}]/HolPosition
XML representation: The text of the HolPosition element.
Reading: Reads the element into aPropValue.stndOptions.St[iHolList].HolPosition when for each iHolList from qhlA through qhlU; the record node exists; UseDefaultVals is false.
Writing: Stores the numeric value of St[iHolList].HolPosition when for each iHolList from qhlA through qhlU; the following is false: St[iHolList].IsDefault is true.
SaintsOptions[@TqHolList={s}]/HolSep
XML representation: The text of the HolSep element.
Reading: Reads the element into aPropValue.stndOptions.s when for each iHolList from qhlA through qhlU; the record node exists; UseDefaultVals is false. The subsequent conversion is shown in Implementation.
Writing: Stores St[iHolList].HolSep when for each iHolList from qhlA through qhlU; the following is false: St[iHolList].IsDefault is true.
SaintsOptions[@TqHolList={s}]/NumSaintsShown
XML representation: The text of the NumSaintsShown element.
Reading: Reads the element into aPropValue.stndOptions.St[iHolList].NumSaintsShown when for each iHolList from qhlA through qhlU; the record node exists; UseDefaultVals is false.
Writing: Stores the numeric value of St[iHolList].NumSaintsShown when for each iHolList from qhlA through qhlU; the following is false: St[iHolList].IsDefault is true.
SaintsOptions[@TqHolList={s}]/IntraHolSep
XML representation: The text of the IntraHolSep element.
Reading: Reads the element into aPropValue.stndOptions.s when for each iHolList from qhlA through qhlU; the record node exists; UseDefaultVals is false. The subsequent conversion is shown in Implementation.
Writing: Stores St[iHolList].IntraHolSep when for each iHolList from qhlA through qhlU; the following is false: St[iHolList].IsDefault is true.
SaintsOptions[@TqHolList={s}]/@TqHolList
XML representation: The TqHolList attribute.
Writing: Stores s when for each iHolList from qhlA through qhlU.
SaintsOptions[@TqHolList={s}]/@rec_type
XML representation: The rec_type attribute.
Writing: Stores the literal text “TSaintsOptionsRec” when for each iHolList from qhlA through qhlU.
Initialization and reset values
TSaintsOptions.Create
Setting or temporary variable |
Initial value |
When it is assigned |
Version |
0 |
Always |
PropName |
“Saints/Namedays” |
Always |
Required |
1 |
Always |
PropValue |
Default (TSL_PropValue) |
Always |
PropValue.stndOptions.St[iHolList].OverrideSaints |
false |
for each iHolList from qhlA through qhlU |
PropValue.stndOptions.St[iHolList].SaintsSet |
0 |
for each iHolList from qhlA through qhlU |
PropValue.stndOptions.St[iHolList].Separator |
an empty string |
for each iHolList from qhlA through qhlU |
PropValue.stndOptions.St[iHolList].Sorted |
false |
for each iHolList from qhlA through qhlU |
PropValue.stndOptions.St[iHolList].UseNamedays |
false |
for each iHolList from qhlA through qhlU |
PropValue.stndOptions.St[iHolList].UseHolSet |
false |
for each iHolList from qhlA through qhlU |
PropValue.stndOptions.St[iHolList].HolSet |
0 |
for each iHolList from qhlA through qhlU |
PropValue.stndOptions.St[iHolList].HolPosition |
2 |
for each iHolList from qhlA through qhlU |
PropValue.stndOptions.St[iHolList].HolSep |
an empty string |
for each iHolList from qhlA through qhlU |
PropValue.stndOptions.St[iHolList].NumSaintsShown |
0 |
for each iHolList from qhlA through qhlU |
PropValue.stndOptions |
IniSettings.SaintsOptions.DataValue.stndOptions |
UseIniSettingsInPropertyConstructor is true |
DataValue |
PropValue |
Always |
This routine also calls inherited Create; self.FillDisplayValue. See Implementation for their order and any conditional calls.
Supporting initializers and helpers supplied with the owner
These supporting records are used directly by this owner or by an initializer it calls. Their relevant supplied routines appear in separate Supporting implementation toggles below.
TSaintsOptionsRec.ResetToDefaults
Setting or temporary variable |
Initial value |
When it is assigned |
OverrideSaints |
false |
Always |
SaintsSet |
0 |
Always |
Separator |
an empty string |
Always |
Sorted |
false |
Always |
UseNamedays |
false |
Always |
UseHolSet |
false |
Always |
HolSet |
0 |
Always |
HolPosition |
2 |
Always |
HolSep |
an empty string |
Always |
NumSaintsShown |
0 |
Always |
Value namespaces used by this implementation
These are declared Pascal ordinal values. Use the ordinal only where the field serializer actually writes ord(...), an integer cast or an equivalent value. Set-marker strings and local option lists have their own representation; sentinel members in an enum are not automatically legal XML choices.
TqHolList
Ordinal |
Declared member |
0 |
qhlA |
1 |
qhlE |
2 |
qhlI |
3 |
qhlO |
4 |
qhlU |
5 |
qhlNone |
6 |
qhlInsert |
7 |
qhlXtra |
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.
TSaintsOptionsRec member shape
Member |
Declared type |
OverrideSaints |
Boolean |
SaintsSet |
integer |
FSeparator |
array [1..20] of Char |
Sorted |
Boolean |
UseNamedays |
Boolean |
UseHolSet |
Boolean |
HolSet |
integer |
HolPosition |
integer |
FHolSep |
array [1..25] of Char |
NumSaintsShown |
integer |
FIntraHolSep |
array [1..25] of Char |
The Implementation toggle contains only TSaintsOptions methods. Initializers and helpers belonging to other types are identified separately below. Shared XML-helper limitations are explained in Reading this reference.
Supporting implementation — TSaintsOptionsRec
The following routines belong to TSaintsOptionsRec, a supporting type used by this implementation. They are not methods of TSaintsOptions.
Declaration — TSaintsOptionsRec
Supporting implementation — TSaintsOptionsRec