This topic covers the implementation details of TSL_Property.
Scope: cSL_Property.pas; class derived from TObject. Prepared from the curated implementation supplied for this review on 2 October 2026.
Base serializer for scriptline properties. It adds prop_id, class_name and prop_name to a supplied property node. If the descendant has not created a property node, this base writer creates one and writes status=NOT_IMPLEMENTED.
Base ReadFromXML and SaveTextBlobToXML are empty in the supplied unit. A concrete property must supply its payload behavior or inherit it from another implementation. xmlClassName returns ClassName unless overridden.
prop_id belongs to the containing script line’s property namespace. FPropId starts at zero; script line property registration supplies the meaningful value. That registration and SetDataValue behavior are outside this package.
Notation and shared helper rules: Reading this reference.
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.
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.
status
XML representation: The text of the status element.
Writing: Stores the literal text “NOT_IMPLEMENTED” when propertyNode is absent.
Import: This routine does not read this field. See the inherited or enclosing implementation where applicable.
@prop_id
XML representation: The prop_id attribute.
Writing: Stores the text representation of PropID when propertyNode is absent.
Writing: Stores the text representation of PropID whenever the writer reaches this field.
property[@prop_id={self.PropID.toString}]/@class_name
XML representation: The class_name attribute.
Writing: Stores xmlClassName when propertyNode is absent.
.[@prop_id={self.PropID.toString}]/@class_name
XML representation: The class_name attribute.
Writing: Stores xmlClassName whenever the writer reaches this field.
property[@prop_id={self.PropID.toString}][@class_name={self.xmlClassName}]/@prop_name
XML representation: The prop_name attribute.
Writing: Stores PropName when propertyNode is absent.
.[@prop_id={self.PropID.toString}][@class_name={self.xmlClassName}]/@prop_name
XML representation: The prop_name attribute.
Writing: Stores PropName whenever the writer reaches this field.
Initialization and reset values
TSL_Property.Create
Setting or temporary variable |
Initial value |
When it is assigned |
FParent |
nil |
Always |
FSelected |
False |
Always |
DisabledDisplayText |
“[n/a]” |
Always |
FPropId |
0 |
Always |
IsVisible |
True |
Always |
HelpID |
0 |
Always |
IsEnabled |
true |
Always |
EditingTag |
0 |
Always |
CouldNotBeLoaded |
false |
Always |
LoadingErrorString |
an empty string |
Always |
FDataValue |
Default (TSL_PropValue) |
Always |
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 |
IsVisible |
Boolean |
member |
EditingTag |
NativeInt |
member |
IsEnabled |
Boolean |
member |
HelpID |
integer |
member |
DisabledDisplayText |
string |
member |
CouldNotBeLoaded |
Boolean |
member |
LoadingErrorString |
string |
member |
The Implementation toggle contains only TSL_Property methods. Initializers and helpers belonging to other types are identified separately below. Shared XML-helper limitations are explained in Reading this reference.