This topic covers the implementation details of THolidaysOverride.
Scope: cpHolidaysOverride.pas; class derived from TBtnEditProperty. Prepared from the curated implementation supplied for this review on 2 October 2026.
Each a/e/i/o/u-holidays node holds Enabled, NumSets and OverrideSets. NumSets drives reads of the indexed HolidaysSet children. Keep count, available slots and element values consistent. The existing help says up to 20 override slots; the source’s array declaration is the implementation constraint.
The a/e/i/o/u names are literal element prefixes derived from charHolLists. Each text value is a holiday-set database ID.
Notation and shared helper rules: Reading this reference.
Literal rec_type values emitted within these routines: THolidaysOverrideOptions. 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.
{s + '-holidays'}/Enabled
XML representation: The text of the Enabled element.
Initial value: PropValue (THolidaysOverride.Create).
Reading: Reads the element into aPropValue.hoo[iqhl].Enabled when for each iqhl from qhlA through qhlU; the record node exists.
Writing: Stores true or false according to DataValue.hoo[iqhl].Enabled when for each iqhl from qhlA through qhlU; DataValue.hoo[iqhl].Enabled is true.
{s + '-holidays'}/NumSets
XML representation: The text of the NumSets element.
Reading: Reads the element into NumSets when for each iqhl from qhlA through qhlU; the record node exists. Before this read, NumSets is set to 0.
Writing: Stores the numeric value of i - 1 when for each iqhl from qhlA through qhlU; DataValue.hoo[iqhl].Enabled is true.
{s + '-holidays'}/OverrideSets/HolidaysSet[@id={i.toString}]
XML representation: The text of the HolidaysSet[@id={i.toString}] element.
Initial value: PropValue (THolidaysOverride.Create).
Reading: Reads the element into aPropValue.hoo[iqhl].ListSets[i] when for each iqhl from qhlA through qhlU; the record node exists; node2 exists; for each i from 1 through NumSets.
Writing: Stores the numeric value of DataValue.hoo[iqhl].ListSets[i] when for each iqhl from qhlA through qhlU; DataValue.hoo[iqhl].Enabled is true; while DataValue.hoo[iqhl].ListSets[i] is not 0.
{s + '-holidays'}/@rec_type
XML representation: The rec_type attribute.
Writing: Stores the literal text “THolidaysOverrideOptions” when for each iqhl from qhlA through qhlU; DataValue.hoo[iqhl].Enabled is true.
{s + '-holidays'}/OverrideSets/HolidaysSet/@id
XML representation: The id attribute.
Writing: Stores the text representation of i when for each iqhl from qhlA through qhlU; DataValue.hoo[iqhl].Enabled is true; while DataValue.hoo[iqhl].ListSets[i] is not 0.
Initialization and reset values
THolidaysOverride.Create
Setting or temporary variable |
Initial value |
When it is assigned |
Version |
0 |
Always |
PropName |
“x-HolidaysList” |
Always |
Required |
1 |
Always |
PropValue.PropertyType |
ptHolidaysOverride |
Always |
PropValue.hoo |
Default (THolidaysOverrideOptionsList) |
Always |
PropValue.hoo[iQHL].Enabled |
false |
for each iQHL from qhlA through qhlU |
DataValue |
PropValue |
Always |
This routine also calls inherited Create; self.FillDisplayValue. See Implementation for their order and any conditional calls.
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.
Name |
Declared type / bounds |
Kind |
Version |
integer |
member |
The Implementation toggle contains only THolidaysOverride methods. Initializers and helpers belonging to other types are identified separately below. Shared XML-helper limitations are explained in Reading this reference.