Table of Contents

TatCustomScripter.DefineProp Method

Registers a global property in the scripter, accessible from all scripts without an object prefix.

Remarks

Use DefineProp to define a "global" property. DefineProp can be called from an existing TatClass object to register a new property in that class. When you call DefineProp directly from scripter component, the property is not included in a class, but globally in scripter. Thus the property will behave as a global variable, being accessible from all scripts without needing to define an object from which the property will be used. For more details about usage of DefineProp, see TatClasses.DefineProp.

Syntax

Unit: atScript

function TatCustomScripter.DefineProp(AName: string; ADataType: TatTypeKind; AGetter: TMachineProc; ASetter: TMachineProc; APropertyClass: TClass = nil; AIsClassProp: Boolean = False; AIndexCount: Integer = 0): TatProperty;

Parameters

<-> Parameter Type Description
AName string
ADataType TatTypeKind
AGetter TMachineProc
ASetter TMachineProc
APropertyClass TClass Optional: Default value is nil

AIsClassProp Boolean Optional: Default value is False

AIndexCount Integer Optional: Default value is 0

See also