Table of Contents

atScript Namespace

Classes

Name Description
EatCompileError EatCompileError is raised when a compile error occurs during script compilation.
EatDefinitionError Exception raised from the scripter component.
EatInternalError Exception raised from the scripter component.
EatRuntimeError EatRuntimeError is raised when a runtime error occurs in script.
EatScripterDebug Exception raised from the scripter component.
EatScripterFatal Exception raised from the scripter component.
EatScripterRuntime EatScripterRuntime is raised when a runtime error occurs in script.
EatScriptInfoError Exception raised from the scripter component.
TatClass Holds information about a Delphi class registered in scripter. A TatClass object holds information about the Delphi registered class, its methods, properties, and provides methods for registering new methods and properties in the class.
TatClasses A collection of TatClass objects representing all Delphi classes registered in the scripter system.
TatClassRef Used internally by scripter system. Do not use it.
See TatClassRefs for more details.
TatClassRefs Used internally by the scripter. Tracks classes implicitly referenced during script compilation.
TatCustomScripter Base class for all TMS Scripter components, providing script compilation, execution, and Delphi interop registration.
TatDataDef Holds information about a input parameter in a registered method.
TatDataDefs TatDataDefs is a collection of TatDataDef objects that hold information about the input parameters of a specified method.
You can have name, modifier, data type, among other information for each input parameter.
TatDebugWatch Deprecated class.
Use TatScriptWatches for handling watches for debugging purposes. See TatCustomScripter.​Watches property.
TatDebugWatches Deprecated class.
Use TatScriptWatches for handling watches for debugging purposes. See TatCustomScripter.​Watches property.
TatDispatcher​Remove​Notificator Used internally by the scripter.
TatDLL A TatScripterLibrary descendant that bridges script-declared DLL prototypes to actual DLL function calls.
TatEventAdapter Holds the information for the event adapter. You don't need to use this class, it holds only private information.
TatEventAdapters A collection of all event adapters registered in the scripter. One adapter is required per supported event type.
TatEventDispatcher Handles the routing of a specific Delphi event to a script routine.
TatEventDispatchers A collection of TatEventDispatcher objects created by the event broker, one per assigned event handler.
TatInternalObject For internal use only.
TatLibraryList Holds a list of the libraries registered with RegisterScripter​Library.​
You don't need to use this class, it's used internally by scripter.
TatLibraryListItem Holds information about a library registered with RegisterScripter​Library.​
You don't need to use this class, it's used internally by scripter.
TatMethod Contains information about a method registered in scripter system. This information is used by the scripter to know if a class contains a specified method, and how this method should be accessed.
TatMethods Holds the list of TatMethod objects which are the registered method for the class.
TatObject Holds information about an object instance that is being accessible from scripts in a "default" way (methods and properties are directly accessed).
TatObjects Holds a list of object instances that are being accessible from scripts in a "default" way (methods and properties are directly accessed).
TatProperties Holds the list of TatProperty objects which are the registered properties for the class.
TatProperty Contains information about a property registered in scripter system. This information is used by the scripter to know if a class contains a specified property, and how this property should be accessed.
TatRecordWrapper Base class that wraps a Delphi record type so the scripter can interact with it as an object.
TatRoutineInfo TatRoutineInfo holds information about the routine declared in script. You can retrieve parameters, local variables, visibility, and more.
TatRoutinesInfo TatRoutinesInfo holds a list of TatRoutineInfo objects which contains information about the routines declared in script, such as the routine name, parameters, etc.. The main routine is also present in the collection.
TatScript Represents a single script in the scripter component, holding source code, compiled p-code, and runtime state.
TatScriptBased​Library A TatScripterLibrary descendant that exposes a script as a reusable library to other scripts.
TatScriptBreak TatScriptBreak contains information about a breakpoint set in the script. Use this class to programatically set a breakpoint in the script source code for debugging purposes.
TatScriptBreakPoint Deprecated. Use TatScriptBreaks and TatScriptBreak instead. See TatScript.Breaks.
TatScriptBreakPoints Deprecated. Use TatScriptBreaks instead. See TatScript.Breaks.
TatScriptBreaks TatScriptBreaks holds a collection of all breakpoints set in the script. Use this collection to programatically add, edit and remove breakpoints in script source code.
TatScripterEvent​Broker For event support.
TatScripterLibrary Base class for all Delphi-based libraries that can be registered in the scripter.
TatScripterWatch TatScripterWatch holds information about a watch in scripter system, for debugging purposes.
It holds the expression of the watch, calculate its value, among other properties.
TatScripterWatches Holds a collection of TatScripterWatch objects used for evaluating expressions during script debugging.
TatScriptInfo Provides information about a compiled script, including its declared routines and global variables.
TatScriptList Internal list that holds TatScript instances, used by the scripter for derived and related scripts.
TatScriptRefactor TatScriptRefactor is an auxiliary class that provides useful methods for safely change a script source code, like adding a unit in the uses clause, changing the form directive, among others.
TatScripts TatScripts holds a collection of TatScript objects belonging to the scripter. You can add, delete and iterate through the available scripts.
TatUsedUnit Holds information about a unit used in the script. See TatScript.UsedUnits property for more info.
TatUsedUnits Holds a collection of TatUsedUnit objects related to the used units in the script. See TatScript.UsedUnits property for more info.
TatVariableInfo Holds information about a variable declared in the script.
TatVariablesInfo A collection of TatVariableInfo objects holding information about variables declared in a script or routine.
TatVirtualMachine Executes the compiled p-code of an associated script and manages all runtime state during execution.
TatVirtualMachines A collection holding the virtual machine(s) for a script. Currently limited to a single virtual machine per script.
TBaseScripterMachine A concrete TatVirtualMachine descendant that provides default UI-interaction implementations for ShowMessage, InputQuery, MessageBox, and debug hook handling.
TBreakPointList Internal list that holds TatScriptBreakPoint instances for a script.
TCodeCompletion​Entries Collection of TCodeCompletionEntry objects representing a set of code completion suggestions.
TCodeCompletionEntry Represents a single code completion suggestion consisting of a token and its associated value.
TCodeInsightContext Internal class used to hold last choices made by end-user, so we can offer best choices for him next time.
TDefineClassOptions Encapsulates options used when registering a Delphi class in the scripter via RTTI.
TGenericEvent​Dispatcher Generic event dispatcher class, for auto-definition of classes using RTTI (see TatCustomScripter.​Define​Class​ByRTTI)​.​
TGenericRecord​Wrapper Generic record wrapper class, for auto-definition of records using RTTI (see TatCustomScripter.​Define​Record​ByRTTI)​.​
TLibInstanceList Internal list that holds the TatScripterLibrary instances currently registered in the scripter.
TObjList Internal general-purpose list of TObject instances used by the scripter for various collections.
TScriptBaseObject Base class for all objects instantiated from script-based class declarations using the $CLASS directive.
TScripterCodeInsight A helper class that provides code completion and parameter hint capabilities for the scripter.
TScripterLibrary​Options TScripterLibrary​Options holds some environment/running options for the scripts being compiled/executed.
It contains info like search path, default file extension, and some other available options.
TScriptFormFactory Abstract factory class for creating script-based form instances.
TScriptFormLoader Helper class that loads a DFM form resource and wires event handlers for script-based forms.

Records

Name Description
TAddress Represents a single forward-reference address entry used internally during label resolution in the compiler.
TCodeFileHeader atPascal simplified code file header.
TElementContext Holds context information about an unrecognized identifier encountered during script compilation.
TIgnorePair Internal use
TImplicitClassRef atPascal simplified code file implicit class reference.
TInstruction​Descriptor Descriptor for instructions when saved to file.
TInstructionDetails atPascal simplified instruction when saved to file.
TLabelSpec Describes a label and all its forward references in the compiled p-code, used internally during compilation.
TSimplifiedCode Represents a single virtual machine instruction in the compiled p-code.
TStackElement Represents a single element in the internal compiler stack used during script compilation.

Interfaces

Name Description
IatInterfacedObject Internal interface used from manipulation of record types
IScriptBasedForm Interface implemented by script-based form objects, extending IScriptBasedObject with form-specific members.
IScriptBasedObject Interface implemented by objects whose state is managed by a TatScript instance.

Class References

Name Description
TatScripterLibrary​Class Class reference type for TatScripterLibrary descendants, used when registering libraries with the scripter.
TDispatcherClass Class reference type for TatEventDispatcher descendants, used when registering custom event adapters.
TRefactorClass Class reference type for TatScriptRefactor descendants, used to specify the refactor class for a script.
TScriptBaseObject​Class Class reference type for TScriptBaseObject descendants, used by TatCustomScripter.ScriptBaseObjectClass.

Enumerations

Name Description
TatArgumentModifier Argument modifiers for use in atPascal class methods.
TatCallingConvention Specifies the calling convention for an external DLL function declared in a script.
TatEventPlacement Specifies how a script event handler replaces a previously set event handler on a Delphi object event.
TatRoutineVisibility Indicates whether the routine was declared as public or private in the script.
TatScriptBehavior Indicates how the script behaves in the scripting system.
TatTypeKind Type kinds for use in atPascal classes.
TatVariableVisibility Indicates whether a global variable was declared as public or private in the script.
TClassReference Class reference types.
TDataOperation Specifies the type of data access operation performed on a script element during compilation.
TEventSetMode Controls how a script event handler is added relative to an existing event handler on a Delphi object.
TEventUnsetMode Specifies what happens to a Delphi event when a script-assigned handler is removed.
TInstruction Identifies a single virtual machine op-code in the compiled p-code instruction set.
TLoopStatement Internal use only.
TRedefineOption Controls the behavior when a class is registered in the scripter but is already present.
TStackType Identifies the type of an internal compiler stack used during script compilation.
TWatchStatus Indicates the current evaluation status of a scripter watch.

Types

Name Description
TBeforeExecuteEvent TBeforeExecuteEvent is called before a script routine (or main block) is executed. ALabel contains the name of the routine to be executed. If the main block is to be executed, ALabel is an empty string.
TBuiltInProc Defines the signature for a user-defined procedure registered in the scripter.
TExecuteEventProc Callback type fired when a Delphi event handled by the scripter is about to be executed.
TGenericProc Generic method pointer type used internally by the scripter as a callback for instruction execution, property getters/setters, and method wrappers.
TLoadLibraryEvent Event type fired when the scripter is asked to load a library by name and default loading logic is insufficient.
TMachineProc TMachineProc is a multi-purpose event mostly used when a script compiled p-code is being executed by the virtual machine.
The machine executing the code is passed in AMachine parameter.
TScriptErrorEvent Event type fired when an error occurs during script compilation or execution.
TSetEventProc Callback type fired after the scripter has successfully assigned a script routine to a Delphi object event.
TSettingEventProc Callback type fired before the scripter assigns a script routine to a Delphi object event.
TSingleStepProc Callback procedure type invoked for each p-code instruction during single-step execution.
TUnknownElementEvent Event type fired during script compilation when the compiler encounters an unrecognized identifier.
TUnsetEventProc Callback type fired before the scripter removes a script routine from a Delphi object event.

Global Variables

Name Description
atLibraryList atLibraryList global variable holds a collection of all library classes registered with RegisterScripter​Library procedure.
OnGlobalScripter​Create A global event fired whenever a scripter component is created in the application.
OnGlobalScripter​Loaded A global event fired whenever a scripter component is loaded from a DFM in the application.

Methods

Name Description
AssignedMethod Returns true if the method specified by m is assigned.
ColNumberFrom​Instruction Returns the column number in source code corresponding to the p-code instruction specified by inst.
CreateCodeCompletion​List Builds a string list containning code completion suggestions related to a input string AInputText (source code) and an cursor position (AInputPos).
DefineEventAdapter Registers a global event adapter that enables the scripter to handle Delphi events of the type specified by ARttiInfo.
DefinitionError Raises an EatDefinitionError exception.
EvaluateWatch Deprecated. Use TatCustomScripter.​Watches property.
InstructionIs​Executable Returns true if the instruction specified by inst in the provided scripter contains executable code.
Some instructions might not be executable, but only preparation instructions (saving space in stack, for example).
InternalError Raises an EatInternalError exception.
IntFromConstSet Deprecated.
IntFromSet Converts a set type to an integer. You must provide the size of set type in ASize parameter.
IntToSet Converts an integer value to a set type. You must provide the size of set type in ASize parameter.
LineNumberFrom​Instruction Returns the line number in source code corresponding to the p-code instruction specified by inst.
MakeVarByRef Turns an existing variant into a variant with a ByRef flag set.
ObjectToVar Converts a TObject to Variant type
PointerToVar Converts a Pointer to Variant type
RaiseRuntimeError Raises an EatRuntimeError exception.
RegisterScripter​Library Registers a TatScripterLibrary class globally so that all scripter components in the application can use it.
ScriptInfoError Raises an EatScriptInfoError exception.
ScriptValueIsOrdinal Verifies if the specified script value is holds an ordinal value (integer or enumerated types).
Returns true if value is string, false otherwise.
ScriptValueIsString Verifies if the specified script value is holds a string value. Returns true if value is string, false otherwise.
StrVal Converts a string value to double. It tries using both '.' and ',' as decimal separator, and it doesn't raise a convert error in case s is a invalid float value.
ToVariant Converts a script value to a Variant. This function is useful if you want to write common code for both desktop and mobile appliations using scripter.
For desktop applications, this function makes no difference, since script values are variants. For mobile, script values are TValue records, thus this function converts it to a variant value.
UnregisterScripter​Library Unregisters a library previously registered with RegisterScripter​Library.​
VarContent Returns a text description describing the content of the variant.
VarToBoolean Converts a variant to boolean. Value is false if variant is zero, true otherwise.
VarToEnumInteger Converts a variant value to an enumerated integer. The variant may hold the enumeration name as a string (e.g., 'alClient').
VarToFloat Converts a variant to double.
VarToInt64 Converts a variant type to Int64.
VarToInteger Converts a variant type to integer.
VarToIntObject Converts a variant type to an integer (32 or 64 bit) value that represents the object
VarToObject Converts a variant type to TObject.
VarToPointer Converts a variant type to Pointer.
VarToSet Converts a variant type to a set type. The variant is an array of string with the names of enumerated types belonging to the set. The PropType parameter must receive the RTTI info about the enumerated type.
VarToUInt64 Converts a variant type to UInt64.