Hello.
Please tell me how you can connect the function from the host application to the script "on the fly", that is, during the execution of the program?
I tried to do this, but nothing worked.
getSumLocal := @GetSUM;
LMDScriptControl1.AddObject('getSumLocal', TLMDEventWrapper.ToVar(LMDScriptControl1, 'getSumLocal'));
LMDScriptControl1.Active := True;
LMDScriptControl1.RunProc('Button1Click', [0]);
I attach an example application.
Thank you.
Comments
Thank you very much for your reply.
On your advice, I created a class to implement the necessary functions. I made a wrapper for him with the help of a wizard.
But I get an error when compiling. Tell me what to do?