Please enable JavaScript to view this site.

 

This topic covers the implementation details of TRepeatDates.

 

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

 

RepeatDate children hold Month and Day, indexed from 1. Reading stops at the first missing indexed node. SkipFirstOccurrence and SkipLastOccurrence are siblings of RepeatDates at property level.

 

Notation and shared helper rules: Reading this reference.

 

XML identity and composition

 

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

 

RepeatDates/RepeatDate[@id={i.toString}]/Month

 

XML representation: The text of the Month element.

 

Initial value: PropValue (TRepeatDates.Create).

 

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

 

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

 

RepeatDates/RepeatDate[@id={i.toString}]/Day

 

XML representation: The text of the Day element.

 

Initial value: PropValue (TRepeatDates.Create).

 

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

 

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

 

SkipFirstOccurrence

 

XML representation: The text of the SkipFirstOccurrence element.

 

Initial value: 0 (TRepeatDates.Create).

 

Reading: Reads the element into SkipFirstOccurrence.

 

Writing: Stores the numeric value of SkipFirstOccurrence whenever the writer reaches this field.

 

SkipLastOccurrence

 

XML representation: The text of the SkipLastOccurrence element.

 

Initial value: 0 (TRepeatDates.Create).

 

Reading: Reads the element into SkipLastOccurrence.

 

Writing: Stores the numeric value of SkipLastOccurrence whenever the writer reaches this field.

 

RepeatDates/@rec_type

 

XML representation: The rec_type attribute.

 

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

 

RepeatDates/RepeatDate[@id={i.toString}]/@id

 

XML representation: The id attribute.

 

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

 

Initialization and reset values

 

TRepeatDates.Create

 

Setting or temporary variable

Initial value

When it is assigned

PropName

“Fixed Insert Dates”

Always

Required

1

Always

SkipFirstOccurrence

0

Always

SkipLastOccurrence

0

Always

ListDates

TStringList.Create

Always

ListDates.Sorted

true

Always

ListDates.Duplicates

dupIgnore

Always

PropValue

Default (TSL_PropValue)

Always

PropValue.PropertyType

ptRepeatDates

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

SkipFirstOccurrence

integer

member

SkipLastOccurrence

integer

member

 

Implementation details

 

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

 

Implementation