#1 2013-08-07 10:53:35

DigDiver
Member
Registered: 2013-04-29
Posts: 137

Multiple clients and OnIdle

If I use more than one TSQLRestClientURI for which OnIdle is defined, the program comes into the loop (the OnIdle event is called all the time).

This can be easily reproduced at the example "04 - HTTP Client-Server".

  Database: TSQLRestClientURI;
  NewClient : TSQLRestClientURI;
  ...

  procedure TForm1.FindButtonClick(Sender: TObject);
   var Rec: TSQLSampleRecord;
  begin
   Database.OnIdle :=  OnIdleClient;

  ...


procedure TForm1.FormCreate(Sender: TObject);
begin
  Model := CreateSampleModel; // from SampleData unit
  NewClient := TSQLHttpClient.Create( 'localhost','888',Model);
  NewClient.OnIdle := OnIdleClient; // NewClient.OnIdle := OnIdleClient2;
  NewClient.SetUser('User','synopse');
end;

Offline

#2 2013-08-07 11:20:51

ab
Administrator
From: France
Registered: 2010-06-21
Posts: 14,661
Website

Re: Multiple clients and OnIdle

What are you doing in your OnIdleClient method?

Are you using the latest version from today?
We committed some fixes yesterday.

Offline

#3 2013-08-07 11:54:39

DigDiver
Member
Registered: 2013-04-29
Posts: 137

Re: Multiple clients and OnIdle

Thanks ab, with today version all works fine.

Offline

#4 2013-08-07 13:45:59

ab
Administrator
From: France
Registered: 2010-06-21
Posts: 14,661
Website

Re: Multiple clients and OnIdle

smile

Offline

Board footer

Powered by FluxBB