[Pas2js] TDataset load local JSON in a async way. How?

warleyalex warleyalex at yahoo.com.br
Sat Aug 29 14:01:19 CEST 2020


Excellent!

In my crazy experimental example:

live preview: https://pas2js.github.io/master/ProjectFishfacts/index.html

I can populate the fishrecord, but in the TConnection|AfterConnect event, I
could load async JSON data using Dataset. 

fConnection.AfterConnect:= @AfterConn;

procedure TJFishFacts.AfterConn(Sender: TObject);
begin
  (* initialize / fill the first TFishRecord *)
  console.log(  fDataset.Active); // TRUE
end;

It is so nice, there is no need for timers or promises at all!




--
Sent from: http://pas2js.38893.n8.nabble.com/


More information about the Pas2js mailing list