delphi-rest-client-api icon indicating copy to clipboard operation
delphi-rest-client-api copied to clipboard

XE4 compiling problem

Open berniQ23 opened this issue 7 years ago • 3 comments

A fresh checkout from today gives on compiling DelphiXE4_RestApi.bpl:

[dcc32 Fehler] RestClient.pas(1001): E2250 Es gibt keine überladene Version von 'Post', die man mit diesen Argumenten aufrufen kann => function TResource.Post(Entity: TObject): TObject; begin Result := Post(Entity, Entity.ClassType); end;

[dcc32 Fehler] RestClient.pas(1028): E2250 Es gibt keine überladene Version von 'Put', die man mit diesen Argumenten aufrufen kann => function TResource.Put(Entity: TObject): TObject; begin Result := Put(Entity, Entity.ClassType); end;

[dcc32 Fehler] RestClient.pas(1065): E2250 Es gibt keine überladene Version von 'Patch', die man mit diesen Argumenten aufrufen kann => function TResource.Patch(Entity: TObject): TObject; begin Result := Patch(Entity, Entity.ClassType); end;

How to fix it? Regards, Bernd

berniQ23 avatar Feb 13 '18 16:02 berniQ23

Getting same error with XE5

mbirabhadra avatar May 27 '18 23:05 mbirabhadra

Use instead of the faulty method calls:

function TResource.Post(Entity: TObject): TObject; begin Result := EntityRequest(Entity, Entity.ClassType, METHOD_POST); // Result := Post(Entity, Entity.ClassType); end;

function TResource.Put(Entity: TObject): TObject; begin Result := EntityRequest(Entity, Entity.ClassType, METHOD_PUT); // Result := Put(Entity, Entity.ClassType); end;

function TResource.Patch(Entity: TObject): TObject; begin Result := EntityRequest(Entity, Entity.ClassType, METHOD_PATCH); // Result := Patch(Entity, Entity.ClassType); end;

kattes avatar Jan 04 '19 14:01 kattes

That worked man!! Just search the commented lines and go ahead with the full replacements of the associated functions/procedures as suggested above. It will compile!

mbirabhadra avatar Aug 28 '20 01:08 mbirabhadra