This topic covers the implementation details of TXceptions.
Scope: cpXceptions.pas; class derived from TBLOB_Property. Prepared from the curated implementation supplied for this review on 2 October 2026.
MacroIndex slots 1–30 are independently searched, so sparse numbering is supported. MacroTableId selects an external macro program; XML stores activation, initial-condition data and true/false resulting actions.
BoxActions.ActionType selects additional BoxZorder, BoxText or Image payloads. True and false actions are serialized separately. The reader creates a TMacroBlobItem, then builds a separate Default(TMacroBlobRec), so absent child behavior must not be inferred solely from TMacroBlobRec.Initialize.
Notation and shared helper rules: Reading this reference.
Literal rec_type values emitted within these routines: TMacroBlobItem, TMacroResultingActions. Nested values may belong to child wrappers rather than this owner itself; the attribute entries below give their exact locations.
Structures used directly by this XML implementation:
TMacroBlobItem (supporting record documented below).
TMacroBlobRec (supporting record documented below).
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.
MacroIndex[@id={curTokIdx.toString}]/Activated
XML representation: The text of the Activated element.
Reading: Reads the element into aBlobRec.Activated when for each curTokIdx from low (TXtensionIdRecList) through high (TXtensionIdRecList); the record node exists.
Export: No corresponding write is implemented locally. This can be a compatibility input or a field handled elsewhere.
MacroIndex[@id={curTokIdx.toString}]/MacroTableId
XML representation: The text of the MacroTableId element.
Reading: Reads the element into aPropValue.xt[curTokIdx].TableId when for each curTokIdx from low (TXtensionIdRecList) through high (TXtensionIdRecList); the record node exists.
Export: No corresponding write is implemented locally. This can be a compatibility input or a field handled elsewhere.
MacroIndex[@id={curTokIdx.toString}]/InitCRC
XML representation: The text of the InitCRC element.
Reading: Reads the element into aBlobRec.InitCRC when for each curTokIdx from low (TXtensionIdRecList) through high (TXtensionIdRecList); the record node exists.
Export: No corresponding write is implemented locally. This can be a compatibility input or a field handled elsewhere.
MacroIndex[@id={curTokIdx.toString}]/strInitialConditions
XML representation: The text of the strInitialConditions element.
Reading: Reads the element into aBlobRec.strInitialConditions when for each curTokIdx from low (TXtensionIdRecList) through high (TXtensionIdRecList); the record node exists.
Export: No corresponding write is implemented locally. This can be a compatibility input or a field handled elsewhere.
MacroIndex[@id={curTokIdx.toString}]/ResultingActionsIfTrue/IntAction
XML representation: The text of the IntAction element.
Reading: Reads the element into aBlobRec.IntActionIfTrue when for each curTokIdx from low (TXtensionIdRecList) through high (TXtensionIdRecList); the record node exists; node2 exists.
Export: No corresponding write is implemented locally. This can be a compatibility input or a field handled elsewhere.
MacroIndex[@id={curTokIdx.toString}]/ResultingActionsIfFalse/IntAction
XML representation: The text of the IntAction element.
Reading: Reads the element into aBlobRec.IntActionIfFalse when for each curTokIdx from low (TXtensionIdRecList) through high (TXtensionIdRecList); the record node exists; node2 exists.
Export: No corresponding write is implemented locally. This can be a compatibility input or a field handled elsewhere.
MacroIndex[@id={curTokId.toString}]/@id
XML representation: The id attribute.
Writing: Stores the text representation of curTokId when for each i from 0 through pred (listOrderedBlobItems.Count).
MacroIndex[@id={curTokId.toString}]/@rec_type
XML representation: The rec_type attribute.
Writing: Stores the literal text “TMacroBlobItem” when for each i from 0 through pred (listOrderedBlobItems.Count).
MacroIndex[@id={curTokId.toString}]/Activated
XML representation: The text of the Activated element.
Writing: Stores true or false according to CurBlobItem.Activated when for each i from 0 through pred (listOrderedBlobItems.Count).
Import: This routine does not read this field. See the inherited or enclosing implementation where applicable.
MacroIndex[@id={curTokId.toString}]/MacroTableId
XML representation: The text of the MacroTableId element.
Writing: Stores the numeric value of CurBlobItem.TableId when for each i from 0 through pred (listOrderedBlobItems.Count).
Import: This routine does not read this field. See the inherited or enclosing implementation where applicable.
MacroIndex[@id={curTokId.toString}]/InitCRC
XML representation: The text of the InitCRC element.
Writing: Stores the numeric value of CurBlobItem.InitCRC when for each i from 0 through pred (listOrderedBlobItems.Count).
Import: This routine does not read this field. See the inherited or enclosing implementation where applicable.
MacroIndex[@id={curTokId.toString}]/strInitialConditions
XML representation: The text of the strInitialConditions element.
Writing: Stores curBlobRec.strInitialConditions when for each i from 0 through pred (listOrderedBlobItems.Count).
Import: This routine does not read this field. See the inherited or enclosing implementation where applicable.
MacroIndex[@id={curTokId.toString}]/ResultingActionsIfTrue/@rec_type
XML representation: The rec_type attribute.
Writing: Stores the literal text “TMacroResultingActions” when for each i from 0 through pred (listOrderedBlobItems.Count).
MacroIndex[@id={curTokId.toString}]/ResultingActionsIfTrue/IntAction
XML representation: The text of the IntAction element.
Writing: Stores the numeric value of curBlobRec.IntActionIfTrue (see the value table below) when for each i from 0 through pred (listOrderedBlobItems.Count).
Import: This routine does not read this field. See the inherited or enclosing implementation where applicable.
MacroIndex[@id={curTokId.toString}]/ResultingActionsIfFalse/@rec_type
XML representation: The rec_type attribute.
Writing: Stores the literal text “TMacroResultingActions” when for each i from 0 through pred (listOrderedBlobItems.Count).
MacroIndex[@id={curTokId.toString}]/ResultingActionsIfFalse/IntAction
XML representation: The text of the IntAction element.
Writing: Stores the numeric value of curBlobRec.IntActionIfFalse (see the value table below) when for each i from 0 through pred (listOrderedBlobItems.Count).
Import: This routine does not read this field. See the inherited or enclosing implementation where applicable.
Nested records and repeated elements
Operation |
XML location |
When it is processed |
Read aBlobRec.TextActions |
MacroIndex[@id={curTokIdx.toString}]/ResultingActionsIfTrue/TextActions |
for each curTokIdx from low (TXtensionIdRecList) through high (TXtensionIdRecList); the record node exists; node2 exists; node3 exists |
Read aBlobRec.BoxActions |
MacroIndex[@id={curTokIdx.toString}]/ResultingActionsIfTrue/BoxActions |
for each curTokIdx from low (TXtensionIdRecList) through high (TXtensionIdRecList); the record node exists; node2 exists; node3 exists |
Read aBlobRec.BoxZorder |
MacroIndex[@id={curTokIdx.toString}]/ResultingActionsIfTrue/BoxActions/BoxZorder |
for each curTokIdx from low (TXtensionIdRecList) through high (TXtensionIdRecList); the record node exists; node2 exists; aBlobRec.BoxActions.ActionType is xbaZorder (8); node4 exists |
Read aBlobRec.BoxText |
MacroIndex[@id={curTokIdx.toString}]/ResultingActionsIfTrue/BoxActions/BoxText |
for each curTokIdx from low (TXtensionIdRecList) through high (TXtensionIdRecList); the record node exists; node2 exists; aBlobRec.BoxActions.ActionType is xbaModifyText (7); node4 exists |
Read aBlobRec.Image |
MacroIndex[@id={curTokIdx.toString}]/ResultingActionsIfTrue/BoxActions/Image |
for each curTokIdx from low (TXtensionIdRecList) through high (TXtensionIdRecList); the record node exists; node2 exists; aBlobRec.BoxActions.ActionType is xbaUseImage (4); node4 exists |
Read aBlobRec.TextActionsIfFalse |
MacroIndex[@id={curTokIdx.toString}]/ResultingActionsIfFalse/TextActions |
for each curTokIdx from low (TXtensionIdRecList) through high (TXtensionIdRecList); the record node exists; node2 exists; node3 exists |
Read aBlobRec.BoxActionsIfFalse |
MacroIndex[@id={curTokIdx.toString}]/ResultingActionsIfFalse/BoxActions |
for each curTokIdx from low (TXtensionIdRecList) through high (TXtensionIdRecList); the record node exists; node2 exists; node3 exists |
Read aBlobRec.BoxZorderIfFalse |
MacroIndex[@id={curTokIdx.toString}]/ResultingActionsIfFalse/BoxActions/BoxZorder |
for each curTokIdx from low (TXtensionIdRecList) through high (TXtensionIdRecList); the record node exists; node2 exists; aBlobRec.BoxActionsIfFalse.ActionType is xbaZorder (8); node4 exists |
Read aBlobRec.BoxTextIfFalse |
MacroIndex[@id={curTokIdx.toString}]/ResultingActionsIfFalse/BoxActions/BoxText |
for each curTokIdx from low (TXtensionIdRecList) through high (TXtensionIdRecList); the record node exists; node2 exists; aBlobRec.BoxActionsIfFalse.ActionType is xbaModifyText (7); node4 exists |
Read aBlobRec.ImageIfFalse |
MacroIndex[@id={curTokIdx.toString}]/ResultingActionsIfFalse/BoxActions/Image |
for each curTokIdx from low (TXtensionIdRecList) through high (TXtensionIdRecList); the record node exists; node2 exists; aBlobRec.BoxActionsIfFalse.ActionType is xbaUseImage (4); node4 exists |
Write curBlobRec.TextActions |
MacroIndex[@id={curTokId.toString}]/ResultingActionsIfTrue/TextActions |
for each i from 0 through pred (listOrderedBlobItems.Count) |
Write curBlobRec.BoxActions |
MacroIndex[@id={curTokId.toString}]/ResultingActionsIfTrue/BoxActions |
for each i from 0 through pred (listOrderedBlobItems.Count) |
Write curBlobRec.BoxZorder |
MacroIndex[@id={curTokId.toString}]/ResultingActionsIfTrue/BoxActions/BoxZorder |
for each i from 0 through pred (listOrderedBlobItems.Count); curBlobRec.BoxActions.ActionType is xbaZorder (8) |
Write curBlobRec.BoxText |
MacroIndex[@id={curTokId.toString}]/ResultingActionsIfTrue/BoxActions/BoxText |
for each i from 0 through pred (listOrderedBlobItems.Count); curBlobRec.BoxActions.ActionType is xbaModifyText (7) |
Write curBlobRec.Image |
MacroIndex[@id={curTokId.toString}]/ResultingActionsIfTrue/BoxActions/Image |
for each i from 0 through pred (listOrderedBlobItems.Count); curBlobRec.BoxActions.ActionType is xbaUseImage (4) |
Write curBlobRec.TextActionsIfFalse |
MacroIndex[@id={curTokId.toString}]/ResultingActionsIfFalse/TextActions |
for each i from 0 through pred (listOrderedBlobItems.Count) |
Write curBlobRec.BoxActionsIfFalse |
MacroIndex[@id={curTokId.toString}]/ResultingActionsIfFalse/BoxActions |
for each i from 0 through pred (listOrderedBlobItems.Count) |
Write curBlobRec.BoxZorderIfFalse |
MacroIndex[@id={curTokId.toString}]/ResultingActionsIfFalse/BoxActions/BoxZorder |
for each i from 0 through pred (listOrderedBlobItems.Count); curBlobRec.BoxActionsIfFalse.ActionType is xbaZorder (8) |
Write curBlobRec.BoxTextIfFalse |
MacroIndex[@id={curTokId.toString}]/ResultingActionsIfFalse/BoxActions/BoxText |
for each i from 0 through pred (listOrderedBlobItems.Count); curBlobRec.BoxActionsIfFalse.ActionType is xbaModifyText (7) |
Write curBlobRec.ImageIfFalse |
MacroIndex[@id={curTokId.toString}]/ResultingActionsIfFalse/BoxActions/Image |
for each i from 0 through pred (listOrderedBlobItems.Count); curBlobRec.BoxActionsIfFalse.ActionType is xbaUseImage (4) |
Initialization and reset values
TXceptions.Create
Setting or temporary variable |
Initial value |
When it is assigned |
PropName |
“Macros” |
Always |
Required |
2 |
Always |
IncludedMacros |
an empty set |
Always |
IncludedHolLists |
an empty set |
Always |
PropValue.xt |
Default (TXtensionIdRecList) |
Always |
PropValue.xt[i].Activated |
False |
for each i from 1 through MAX_NUM_XTENSIONS |
PropValue.xt[i].TableId |
0 |
for each i from 1 through MAX_NUM_XTENSIONS |
DataValue |
PropValue |
Always |
This routine also calls inherited Create; self.FillDisplayValue. See Implementation for their order and any conditional calls.
TXceptions.CreateBlobItem
Setting or temporary variable |
Initial value |
When it is assigned |
result |
TMacroBlobItem.Create (Parent) |
Always |
Supporting initializers and helpers supplied with the owner
These supporting records are used directly by this owner or by an initializer it calls. Their relevant supplied routines appear in separate Supporting implementation toggles below.
TMacroBlobItem.Create
TMacroBlobRec.Initialize
Setting or temporary variable |
Initial value |
When it is assigned |
self |
Default (TMacroBlobRec) |
Always |
Activated |
false |
Always |
TokId |
0 |
Always |
TableId |
0 |
Always |
InitCRC |
0 |
Always |
strInitialConditions |
an empty string |
Always |
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 |
xBoxActionType
Ordinal |
Declared member |
0 |
xbaLeaveAlone |
1 |
xbaModifyBox |
2 |
xbaDeleteBox |
3 |
xbaDeleteGroup |
4 |
xbaUseImage |
5 |
xbaDeleteLayer |
6 |
xbaDeletePage |
7 |
xbaModifyText |
8 |
xbaZorder |
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 |
IncludedMacros |
TSetOfMacros |
member |
IncludedHolLists |
TSetOfHolLists |
member |
Member |
Declared type |
InitCRC |
integer |
Activated |
Boolean |
TokId |
shortInt |
TableId |
integer |
TextActions |
xTextActions |
TextActionsIfFalse |
xTextActions |
BoxActions |
xBoxActions |
BoxActionsIfFalse |
xBoxActions |
BoxText |
TBoxTextAttr |
BoxTextIfFalse |
TBoxTextAttr |
IntActionIfTrue |
xIntActionType |
IntActionIfFalse |
xIntActionType |
Image |
TPictureboxAttr |
ImageIfFalse |
TPictureboxAttr |
BoxZorder |
TBoxZorderRec |
BoxZorderIfFalse |
TBoxZorderRec |
ParentDiaryGridLine |
TObject |
InitialConditions |
TStringList |
Member |
Declared type |
Activated |
Boolean |
TokId |
shortInt |
TableId |
integer |
TextActions |
xTextActions |
TextActionsIfFalse |
xTextActions |
BoxActions |
xBoxActions |
BoxActionsIfFalse |
xBoxActions |
BoxText |
TBoxTextAttr |
BoxTextIfFalse |
TBoxTextAttr |
Image |
TPictureboxAttr |
ImageIfFalse |
TPictureboxAttr |
BoxZorder |
TBoxZorderRec |
BoxZorderIfFalse |
TBoxZorderRec |
InitCRC |
integer |
strInitialConditions |
string |
IntActionIfTrue |
xIntActionType |
IntActionIfFalse |
xIntActionType |
The Implementation toggle contains only TXceptions methods. Initializers and helpers belonging to other types are identified separately below. Shared XML-helper limitations are explained in Reading this reference.
Supporting implementation — TMacroBlobItem
The following routines belong to TMacroBlobItem, a supporting type used by this implementation. They are not methods of TXceptions.
Supporting implementation — TMacroBlobItem
Supporting implementation — TMacroBlobRec
The following routines belong to TMacroBlobRec, a supporting type used by this implementation. They are not methods of TXceptions.
Supporting implementation — TMacroBlobRec