pas2js/demo/rtl
..
ajax.pas
bytes.txt
countries.json
demo_njsprocess.pas
demoajax.html
demoajax.lpi
demoajax.lpr
demobrowserconsole.html
demobrowserconsole.lpi
demobrowserconsole.lpr
democanvas2d.html
democanvas2d.lpi
democanvas2d.pas
democlasstopas.html
democlasstopas.lpi
democlasstopas.pas
democollection.html
democollection.lpi
democollection.pas
democomponents.html
democomponents.lpi
democomponents.lpr
demodatetime.lpi
demodatetime.pas
demodocument1.html
demodocument1.pas
demodombuttonevent.html
demodombuttonevent.lpi
demodombuttonevent.pas
demojsarray.lpi
demojsarray.pas
demojsdataarray.pas
demojsregexp.pas
demojsstring.pas
demoloadstreamfromurl.html
demoloadstreamfromurl.lpi
demoloadstreamfromurl.lpr
demoloadstringsfromurl.html
demoloadstringsfromurl.lpi
demoloadstringsfromurl.lpr
demonew.html
demonew.pas
demonodecmdlineoptions.lpi
demonodecmdlineoptions.pas
demoreadfileinput.html
demoreadfileinput.lpi
demoreadfileinput.lpr
demorouter.lpi
demorouter.pas
demortti.lpi
demortti.pas
demostringlist.html
demostringlist.lpi
demostringlist.pas
demouncaughtexception.html
demouncaughtexception.lpi
demouncaughtexception.pas
demoxhr.html
demoxhr.lpi
demoxhr.lpr
README.md
rtl_demos.lpg

Simple demos for the RTL units

Compiling for running in node.js:

pas2js -Tnodejs -Jirtl.js demojsstring.pas
pas2js -Tnodejs -Jirtl.js demojsregexp.pas
pas2js -Tnodejs -Jirtl.js democollection.pas
pas2js -Tnodejs -Jirtl.js democomponents.lpr
pas2js -Tnodejs -Jirtl.js demostringlist.pas
pas2js -Tnodejs -Jirtl.js demo_njsprocess.pas

Compiling for running in a browser:

pas2js -Jc -Jirtl.js demodombuttonevent.pas
pas2js -Jc -Jirtl.js demodocument1.pas
pas2js -Jc -Jirtl.js democollection.pas
pas2js -Jc -Jirtl.js democomponents.lpr
pas2js -Jc -Jirtl.js demoajax.pas
pas2js -Jc -Jirtl.js democanvas2d.pas
pas2js -Jc -Jirtl.js demonew.pas
pas2js -Jc -Jirtl.js democlasstopas.pas
pas2js -Jc -Jirtl.js demodocument1.pas
pas2js -Jc -Jirtl.js demouncaughtexception.pas
pas2js -Jc -Jirtl.js demoxhr.lpr
pas2js -Jc -Jirtl.js dembrowserconsole.lpr

When using lazarus, you can also open the respective .lpi files, and compile your project. Make sure pas2js is in your path, or the IDE will not find it.

Run in node.js

To run the code, you need to run

nodejs demojsstring.js
nodejs demojsregexp.js

etc.

Run/Show in a browser.

Some of the projects can be run straight from file. Just open the file in the explorer using your favourite browser.

The ajax demo needs to be run from a webserver, just as the demoxhr demo.

One way to do so, is to compile the simpleserver example program from the fcl-web examples, and run it in this directory. Then point your browser to http://localhost:3000/ajaxdemo.html.