Hello,
I am creating a form using TMS Scripter and adding the form to the scripter with the following code:
With atScripter1.AddScript(slPascal) Do
Begin
UnitName := 'FormLib';
SourceCode.Text := MemFormLib.Text;
DesignFormResource := MemFormDFM.Text;
ScriptInfo.FormResource := MemFormDFM.Text;
Compile;
SelfRegisterAsLibrary(UnitName);
End;
I am adding the source code to the scripter with:
{$FORM TForm1, FormLib.sfm}
procedure Button1Click(Sender: TObject);
begin
ShowMessage('Test');
end;
I want to assign the Button1Click event to the Button1 component in the DFM. However, I am getting the following error:
Project Project1.exe raised exception class EReadError with message 'Error reading Button1.OnClick: Invalid property value'.
How can I solve this error? Can you help me?
Thank you!