[Pas2js] Variable in .LPR: How to make global through entire application?
Ulrich, Christian
christian.ulrich at tcsag.de
Fri Nov 9 07:41:30 CET 2018
Pas2js places asm blocks always inside the "pas" scope. Is it maybe an good idea to make it possible to place asm blocks after end. Or before unit/programm to put it directly in the generated .js ?
I had yesterday an simelar problem and had to use an separate .js file wich is no big problem but would be nicer to have that also beside the related pascal class.
-----Ursprüngliche Nachricht-----
Von: Pas2js [mailto:pas2js-bounces at lists.freepascal.org] Im Auftrag von cbsistem via Pas2js
Gesendet: Donnerstag, 8. November 2018 16:30
An: pas2js at lists.freepascal.org
Cc: cbsistem
Betreff: Re: [Pas2js] Variable in .LPR: How to make global through entire application?
Test. Propertys
type
{ TApplication }
TApplication = class(TCustomApplication)
private
{ private declarations }
protected
procedure ApplicationStarting; override;
public
FMyVariable:String; // use propertys
end;
asm
console.log(pas['program'].Application.FMyVariable);
end;
-----
cbsistem
Brasil
--
Sent from: http://pas2js.38893.n8.nabble.com/
_______________________________________________
Pas2js maillist - Pas2js at lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/pas2js
More information about the Pas2js
mailing list