Problem with overloaded method (RTTI registered)

Hello,

Now I have another problem with RTTI registration because of overloaded method.
So I manually add these kind of method using a "DefineMethod". It's ok.

But problem for example with :
TCustomRESTRequest.addBody(...);
We must do it also for all class which are inherited from TCustomRESTRequest.

For example TRestRequest.addBody method.

Scripter.DefineClassByRTTI(TCustomRESTRequest);
Scripter.DefineClassByRTTI(TRESTRequest);

To handle correctly overloaded AddBody method which are overloaded I must do :

  With Scripter.DefineClass(TCustomRESTRequest) do
  begin
DefineMethod('AddBody',4,tkNone,TCustomRESTRequest,__TCustomRESTRequestAddBody,true,3,'');
  end;

But I must also do it for TRESTRequest :

  With Scripter.DefineClass(TRESTRequest) do
  begin
DefineMethod('AddBody',4,tkNone,TRESTRequest,__TRESTRequestAddBody,true,3,'');
  end;

So it's a long work to do because of Overloaded method, or does it exists a quicker way ?

for each case I must study if :

  • DefineClassByRTTI
  • DefineClass
    will be easer to use.

Because it's depand on :

  • There is a lot of overloaded method
  • There is a lot of inherited classes