TatClass Class
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.
Syntax
Unit: atScript
TatClass = class(TCollectionItem);
Methods
| Name | Description |
|---|---|
| AddConstant | Deprecated. Use DefineProp instead. |
| AddDelphiObjectProp | Declare the object specified by AObject as a property in the class, accessible through the name AName. You can then access AObject instance from script as if it was a property of another object. |
| AddEnumeration | Deprecated. Use DefineProp instead. |
| AddObject | Deprecated. Use DefineProp instead. |
| AddVariable | Overloaded AddVariable(string, Variant) AddVariable(string, Extended) AddVariable(string, Double) AddVariable(string, string) AddVariable(string, WideString) AddVariable(string, Integer) AddVariable(string, Boolean) |
| CastFromString | Returns the TatClass corresponding to AClassName, provided the current class is a descendant of it. |
| ClassMethodByName | Returns the TatMethod object associated with the class method specified by AName. If such method doesn't exist, ClassMethodByName returns nil. |
| ClassPropertyByName | Returns the TatProperty object associated with the class property specified by AName. If such property doesn't exist, ClassPropertyByName returns nil. |
| DefineBooleanProp | Declares a boolean property. See DefineProp for more details. |
| DefineFloatProp | Declares a float property. See DefineProp for more details. |
| DefineIntegerProp | Declares an integer property. See DefineProp for more details. |
| DefineMethod | Registers a new method in the class. |
| DefineNewMethod | Registers a new method in the class, always creating a new TatMethod regardless of whether one with the same name already exists. |
| DefineNewProp | Registers a new property in the class, always creating a new TatProperty regardless of whether one with the same name already exists. |
| DefineObjectProp | Declares an object property. See DefineProp for more details. |
| DefineProp | Registers a new property in the class. You don't need to register published properties since they are imported automatically by Delphi scripter. |
| DefineStringProp | Declares a string property. See DefineProp for more details. |
| DefineVariantProp | Declares a variant property. See DefineProp for more details. |
| MethodByName | Returns the TatMethod object associated with the method specified by AName. If such method doesn't exist, MethodByName returns nil. |
| PropertyByName | Returns the TatProperty object associated with the property specified by AName. If such property doesn't exist, PropertyByName returns nil. |
| RemoveProperty | Remove the property specified by the name AName. |
| SetImplicitElement | For internal use. |
Properties
| Name | Description |
|---|---|
| Ancestor | Contains a reference to the TatClass object which is a direct ancestor of this registered class. |
| AncestorName | Contains the name of the class which is the direct ancestor of current class. |
| ClassRef | Holds the Delphi TClass reference that is associated with the current registered class. |
| DefaultProperty | Indicates which is the default property of the class. Used for indexed properties. |
| IsImplicit | For internal use only. Do not use this property. |
| LibContext | Indicates the library that registered the class. Used as a kind of "namespace" for the class. |
| Methods | Holds the list of methods declared in the class. |
| Name | Contains the name of the class as it is known by scripter. For example, 'TButton'. |
| Properties | Holds the list of properties declared in the class. |