[Pas2js] Optimization

pas2js at gauns.org pas2js at gauns.org
Wed Feb 26 09:31:18 CET 2020


> Add somewhere safe:
>   if false then Button1Click(nil);

thats the way i do it now

-----
procedure TForm1.Button1Click(Sender: TObject);
begin
   if Sender = Nil then
     Exit;
   WriteLn( 'Button1 Clicked' );
end;
-----

but its not very nice to have the same code in every event
would be better to have a method to tell the optimization process
"do not remove this procedure" with {$O-} and {$O+} or what ever 
directive

thanks
peter


> 
> Mattias
> _______________________________________________
> Pas2js maillist  -  Pas2js at lists.freepascal.org
> https://lists.freepascal.org/cgi-bin/mailman/listinfo/pas2js


More information about the Pas2js mailing list