TTMSFNCButton in TMS Scripter: Overcoming DFM File Errors

Hello,

I have added TTMSFNCButton using Scripter.DefineClassByRTTI(TTMSFNCButton). I assigned the DFM file value to DesignFormResource and ScriptInfo.FormResource. However, when I try to use the TTMSFNCButton in the DFM file,

I encounter the error "Object not found."

Can you help me with this?

VCLScripter.zip (76.6 KB)

Best regards.

The error is not "Object not found", but "Class TTMSFNCButton not found".

In this case, you need to previously register the class so it can be loaded:

procedure TForm1.FormCreate(Sender: TObject);
begin
  RegisterClass(TTMSFNCButton);
end;