I have to call a delphi method with a variant parameters.

Delphi method declaration:
function MyFunction(const FieldList: string; const FieldValues: variant): boolean 

Use in Scripter:

if MyObject.MyFunction(FieldList, [Value1, Value2]) then

This gives me the exception: 'invalid variant type conversion' in class EVariantTypeCastError.

Please can someone give me a hint where the problem is?

Hello,  which version are you using? Please make sure you are using the latest one.


thanks for the hint, but the problem still exists in the new version.

How are you registering the function? What version are you using?

The function is registered via DefineClassByRTTI. I'm using the latest version 6.5.3 (21/8/2015).

I'm sorry, but I tested here and it works ok. Can you please send us a support e-mail with the sample project that reproduces the problem?