[Pas2js] How to add script like the below in pas2js

Luca Olivetti luca at ventoso.org
Sat Aug 26 16:05:23 CEST 2023


El 26/8/23 a les 15:22, Anderson Junior via Pas2js ha escrit:
> @Michael Van Canneyt
> 
> I apologize, but I forgot an important part of the code that I want to 
> put in the script, which would be one: setInterval(atualizarTabela, 1000);

You can use a timer, e.g.

   FMyTimer:=TTimer.Create(self);
   FMyTimer.OnTimer:=@atualizarTabela;
   FMyTimer.Interval:=1000;
   FMyTimer.Enabled:=true;


and change the definition of atualizarTabela to

procedure atualizarTabela(sender:TObject)


Bye
-- 
Luca



More information about the Pas2js mailing list