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;
I attach an example application.