Please enable JavaScript to view this site.

 

This topic covers the implementation details of TInsertRules.

 

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

 

InsertRule is a mode selector with FirstGrid and NumGrids as companion values. The writer persists the members shown below; legal insertion modes and cross-line applicability come from the owning script line and its omitted validation methods.

 

Notation and shared helper rules: Reading this reference.

 

XML identity and composition

 

No literal rec_type value is emitted directly by the selected routines. A property envelope, an inherited writer or a delegated record can supply its identifying attributes.

 

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.

 

InsertRule/FirstGrid

 

XML representation: The text of the FirstGrid element.

 

Reading: Reads the element into aPropValue.InsertRule.FirstGrid when the record node exists.

 

Writing: Stores the text representation of DataValue.InsertRule.FirstGrid whenever the writer reaches this field.

 

InsertRule/NumGrids

 

XML representation: The text of the NumGrids element.

 

Reading: Reads the element into aPropValue.InsertRule.NumGrids when the record node exists.

 

Writing: Stores the text representation of DataValue.InsertRule.NumGrids whenever the writer reaches this field.

 

Initialization and reset values

 

TInsertRules.CreateInit

 

Setting or temporary variable

Initial value

When it is assigned

PropName

“InsertRules”

Always

DisabledDisplayText

“Only applies in an Insert block”

Always

Required

1

Always

PropValue.PropertyType

ptInsertRules

Always

PropValue.InsertRule.FirstGrid

0

Always

PropValue.InsertRule.NumGrids

1

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.

 

Implementation details

 

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

 

Implementation