Please enable JavaScript to view this site.

 

This topic covers the implementation details of THolidaysList.

 

Scope: cpHolidaysList.pas; class derived from TBtnEditProperty. Prepared from the curated implementation supplied for this review on 2 October 2026.

 

HolidaysSet id attributes are consecutive list positions, not holiday-set IDs. Element text contains the database ID. A gap terminates the read. The local copied list is zeroed before reading, but it is assigned back only if at least one indexed entry was found.

 

Resolve database references before substituting IDs. The list’s MaxNumCountries capacity and database refresh setter were not supplied.

 

Notation and shared helper rules: Reading this reference.

 

XML identity and composition

 

Literal rec_type values emitted within these routines: TCountryIdList. 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.

 

ListCountries/HolidaysSet[@id={i.toString}]

 

XML representation: The text of the HolidaysSet[@id={i.toString}] element.

 

Reading: Converts the stored text to a number and assigns it to aPropValue.ListCountries[i] when the record node exists; for each i from low (TCountryIdList) through high (TCountryIdList); node2 exists.

 

Writing: Stores the text representation of curSetID when for each i from low (TCountryIdList) through high (TCountryIdList); (curSetID is greater than 0 or i is low (TCountryIdList)).

 

ListCountries/@rec_type

 

XML representation: The rec_type attribute.

 

Writing: Stores the literal text “TCountryIdList” whenever the writer reaches this field.

 

ListCountries/HolidaysSet/@id

 

XML representation: The id attribute.

 

Writing: Stores the text representation of i when for each i from low (TCountryIdList) through high (TCountryIdList); (curSetID is greater than 0 or i is low (TCountryIdList)).

 

Initialization and reset values

 

THolidaysList.Create

 

Setting or temporary variable

Initial value

When it is assigned

PropName

“x-HolidaysList”

Always

Required

1

Always

ListDates

TStringList.Create

self is TVarDates

ListDates.Sorted

true

self is TVarDates

ListDates.Duplicates

dupIgnore

self is TVarDates

(self as TVarDates).SkipFirstOccurrence

0

self is TVarDates

(self as TVarDates).SkipLastOccurrence

0

self is TVarDates

PropValue.PropertyType

ptHolidaysList

Always

PropValue.ListCountries

Default (TCountryIdList)

Always

ListType

qhlNone (5)

Always

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

ListType

TqHolList

member

ListDates

TStringList

member

 

Implementation details

 

The Implementation toggle contains only THolidaysList methods. Initializers and helpers belonging to other types are identified separately below. Shared XML-helper limitations are explained in Reading this reference.

 

Implementation