sendTypeMsg

sendTypeMsg(message: String): Any;

The sendTypeMsg method of the Type class sends the sends the specified message (type method) to the receiver type instance. This allows type methods to be called on their defined type without requiring an instance of the type, which differs from the Object class sendTypeMsg method that sends the specified message (type method) to the receiver, requiring a valid instance.

The return type of the sendTypeMsg method allows for an optional return value from the method being called. If the called method returns a value, the Any primitive type result must be cast to the appropriate type, to access that result.

The message parameter value must be the name of a valid type method, which is executed when the sendTypeMsg method is called.

The following code fragment is an example of the sendTypeMsg method.

value := AClass.sendTypeMsg(methodName).Integer;

See also the Type class sendTypeMsgWithParams and sendTypeMsgWithIOParams methods.

2020.0.01 and higher