Please enable JavaScript to view this site.

 

This topic covers the implementation details of THardDates.

 

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

 

HardCodedDate id values are positional slots starting at 1. Reads stop when the resulting date value is nonpositive. They are not database IDs. The existing help defines day zero as 1899-12-30; the array is Word-valued, while the actual slot upper bound is an external constant.

 

A missing HardCodedDates container retains the seeded DataValue. Do not generalize this to clearing an existing script in an update workflow.

 

Notation and shared helper rules: Reading this reference.

 

XML identity and composition

 

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

 

HardCodedDates/HardCodedDate[@id={i.toString}]

 

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

 

Initial value: PropValue (THardDates.Create).

 

Reading: Reads the element into aPropValue.HardDates[i] when the record node exists; for each i from low (THardDatesList) through high (THardDatesList).

 

Writing: Stores the numeric value of DataValue.HardDates[i] when for each i from low (THardDatesList) through high (THardDatesList); the following is false: DataValue.RepeatDates[i].Month is at most 0.

 

HardCodedDates/@rec_type

 

XML representation: The rec_type attribute.

 

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

 

HardCodedDates/HardCodedDate[@id={i.toString}]/@id

 

XML representation: The id attribute.

 

Writing: Stores the text representation of i when for each i from low (THardDatesList) through high (THardDatesList); the following is false: DataValue.RepeatDates[i].Month is at most 0.

 

Initialization and reset values

 

THardDates.Create

 

Setting or temporary variable

Initial value

When it is assigned

PropName

“Hard Insert Dates”

Always

Required

1

Always

ListDates

TStringList.Create

Always

ListDates.Sorted

true

Always

ListDates.Duplicates

dupIgnore

Always

PropValue

Default (TSL_PropValue)

Always

PropValue.PropertyType

ptHardDates

Always

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.

 

Name

Declared type / bounds

Kind

ListDates

TStringList

member

 

Implementation details

 

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

 

Implementation