Table of Contents

TatMethod Class

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.

Syntax

Unit: atScript

TatMethod = class(TCollectionItem);

Methods

Name Description
atClass Provides a reference to the TatClass object in which this method is registered.
IsByRefArg Returns True if the n-th input parameter of the method is declared as passed by reference.
SetVarArgs Specifies which input parameters must be passed by reference to the method.
UpdateObjectInfo Used internally by the compiler. Resolves the class type of this method's return value and loads it into ACurrentClass.
UpdateParameterHints Sets the textual parameter hint information used by the scripter for code completion.

Properties

Name Description
ArgCount Contains the number of input arguments received by the method.
ArgDefs ArgDefs is a collection of TatDataDef objects that hold extra information about the method's input parameters.
ByRefArgMask A bit mask indicating which input parameters of the method are passed by reference, as set by SetVarArgs.
DefArgCount Contains the number of optional (default) arguments of the method. Must be equal to or less than ArgCount.
IsClassMethod Indicates if the method is a regular method (accessible from object instance) or a class method.
LibContext Indicates the library that registered the method. Used as a kind of "namespace" for the method.
Name Contains the name by which the method will be accessible from script.
ResultDataType Holds the data type returned by the method, in case method is function. If the method is a procedure, this must be tkNone.
Scripter Provides a reference to the scripter object which this registered method belongs to.

Events

Name Description
Proc Contains the method wrapper which will be called by the script when the method referenced. This is the method that should actually execute real Delphi method.