This Is The DelphiVCL.Application.MethodAddress Method
By Muhammad Azizul Hakim September 30, 2021
Note: You can use MethodAddress for published methods only.
Here is an easy way to invoke the method is to define a procedure or function data type, such as:
Assign the object name and the MethodAddress method to a TMethod variable, such as:
Pass this in a call to a variable of the procedure or function type:
See the responses in our Windows command prompt:
You can also read short information about the DelphiVCL.Application.MethodAddress using the print() command:
See the responses in our Windows command prompt:
By Muhammad Azizul Hakim September 30, 2021
What is the Purpose of DelphiVCL.Application.MethodAddress?
MethodAddress or DelphiVCL.Application.MethodAddress method returns the address of a class method by name.Note: You can use MethodAddress for published methods only.
How to use DelphiVCL.Application.MethodAddress in Delphi?
To give some sense of how to use this method in Python, let’s learn about how to use it in Delphi.Here is an easy way to invoke the method is to define a procedure or function data type, such as:
Код:
type TProc = procedure of object;
Код:
MethodVar.Data := Pointer(ObjectInstanceName);
MethodVar.Code := ObjectInstanceName.MethodAddress('MethodNameString');
Код:
Proc := TProc(MethodVar);
Proc;
How to browse the properties, methods, and built-in properties of the DelphiVCL.Application.MethodAddress?
Let’s browse all the properties, methods, and built-in properties of the DelphiVCL.Application.MethodAddress using dir() command:
Python:
import DelphiVCL
dir(DelphiVCL.Application.MethodAddress)
You can also read short information about the DelphiVCL.Application.MethodAddress using the print() command:
Python:
print(DelphiVCL.Application.MethodAddress)
print(DelphiVCL.Application.MethodAddress.__doc__)