Jump to content

Problem with RESTRequest.ExecuteAsync


steve589

Recommended Posts

Hi,

 

I want to use TRESTRequest.ExecuteAsync to get content from another website and insert it into my uniGUI frontend.

 

In ExecuteAsync you can specify a procedure which is called when the request returns.

 

So I created:

    procedure TUniMainModule.UpdateContent;

    begin

       ...

    end;

 

but trying to compile this:

 

    RESTRequest.ExecuteAsync(UpdateContent);

 

is not possible: 

[dcc32 Error] MainModule.pas(385): E2010 Inkompatible Types: 'TProc' und 'Procedure of object'

 

ExecuteAsync expects a TProc whereas in uniGUI there is procedure of an object.

 

When I implement a procedure outside of MainModule, I cannot call any object or procedure of the session.

Writing the response to a DB and polling for new datasets in MainModule is no good solution...

 

How can I solve this?

 

Thanks for help

Steve

 

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...