michael a0a0016f99 * Small fixes and demo for TStrings.LoadFromURL 5 лет назад
..
README.md e6289151a9 * Initial import 8 лет назад
ajax.pas e6289151a9 * Initial import 8 лет назад
bytes.txt e52ab39d2b Demo for LoadFromURL for TMemoryStream 5 лет назад
countries.json e6289151a9 * Initial import 8 лет назад
demo_njsprocess.pas e6289151a9 * Initial import 8 лет назад
demoajax.html e6289151a9 * Initial import 8 лет назад
demoajax.lpi 6cb74c087a demo: rtl: set all lpi to compatibility mode 6 лет назад
demoajax.lpr e6289151a9 * Initial import 8 лет назад
demobrowserconsole.html e6289151a9 * Initial import 8 лет назад
demobrowserconsole.lpi 6cb74c087a demo: rtl: set all lpi to compatibility mode 6 лет назад
demobrowserconsole.lpr e6289151a9 * Initial import 8 лет назад
democanvas2d.html e6289151a9 * Initial import 8 лет назад
democanvas2d.lpi 6cb74c087a demo: rtl: set all lpi to compatibility mode 6 лет назад
democanvas2d.pas e6289151a9 * Initial import 8 лет назад
democlasstopas.html 396bda65af * Improved demo for classtopas 5 лет назад
democlasstopas.lpi 396bda65af * Improved demo for classtopas 5 лет назад
democlasstopas.pas 396bda65af * Improved demo for classtopas 5 лет назад
democollection.html e6289151a9 * Initial import 8 лет назад
democollection.lpi 6cb74c087a demo: rtl: set all lpi to compatibility mode 6 лет назад
democollection.pas 4bd0bc76bb * Convert to webproject, demo enumerator for collection and stringlist 8 лет назад
democomponents.html 6d96abb422 * For in loop, converted to web project 8 лет назад
democomponents.lpi 6cb74c087a demo: rtl: set all lpi to compatibility mode 6 лет назад
democomponents.lpr 6d96abb422 * For in loop, converted to web project 8 лет назад
demodatetime.lpi 6cb74c087a demo: rtl: set all lpi to compatibility mode 6 лет назад
demodatetime.pas 8bda483894 rtl: added JSDelete 7 лет назад
demodocument1.html e6289151a9 * Initial import 8 лет назад
demodocument1.pas e6289151a9 * Initial import 8 лет назад
demodombuttonevent.html e6289151a9 * Initial import 8 лет назад
demodombuttonevent.lpi 6cb74c087a demo: rtl: set all lpi to compatibility mode 6 лет назад
demodombuttonevent.pas e6289151a9 * Initial import 8 лет назад
demojsarray.lpi 6cb74c087a demo: rtl: set all lpi to compatibility mode 6 лет назад
demojsarray.pas e6289151a9 * Initial import 8 лет назад
demojsdataarray.pas e6289151a9 * Initial import 8 лет назад
demojsregexp.pas e6289151a9 * Initial import 8 лет назад
demojsstring.pas e6289151a9 * Initial import 8 лет назад
demoloadstreamfromurl.html a0a0016f99 * Small fixes and demo for TStrings.LoadFromURL 5 лет назад
demoloadstreamfromurl.lpi e52ab39d2b Demo for LoadFromURL for TMemoryStream 5 лет назад
demoloadstreamfromurl.lpr a0a0016f99 * Small fixes and demo for TStrings.LoadFromURL 5 лет назад
demoloadstringsfromurl.html a0a0016f99 * Small fixes and demo for TStrings.LoadFromURL 5 лет назад
demoloadstringsfromurl.lpi a0a0016f99 * Small fixes and demo for TStrings.LoadFromURL 5 лет назад
demoloadstringsfromurl.lpr a0a0016f99 * Small fixes and demo for TStrings.LoadFromURL 5 лет назад
demonew.html e6289151a9 * Initial import 8 лет назад
demonew.pas e6289151a9 * Initial import 8 лет назад
demonodecmdlineoptions.lpi dddcdbb4d2 * Node command-line demos 5 лет назад
demonodecmdlineoptions.pas dddcdbb4d2 * Node command-line demos 5 лет назад
demorouter.lpi 6cb74c087a demo: rtl: set all lpi to compatibility mode 6 лет назад
demorouter.pas 60abf7d458 demos: updated for Laz 2.0 6 лет назад
demortti.lpi 6cb74c087a demo: rtl: set all lpi to compatibility mode 6 лет назад
demortti.pas d3e2e69826 typinfo: added GetStrProp, SetStrProp, GetOrdProp, SetStrProp 7 лет назад
demostringlist.html 4bd0bc76bb * Convert to webproject, demo enumerator for collection and stringlist 8 лет назад
demostringlist.lpi 6cb74c087a demo: rtl: set all lpi to compatibility mode 6 лет назад
demostringlist.pas 4bd0bc76bb * Convert to webproject, demo enumerator for collection and stringlist 8 лет назад
demouncaughtexception.html e6289151a9 * Initial import 8 лет назад
demouncaughtexception.lpi 6cb74c087a demo: rtl: set all lpi to compatibility mode 6 лет назад
demouncaughtexception.pas e6289151a9 * Initial import 8 лет назад
demoxhr.html e6289151a9 * Initial import 8 лет назад
demoxhr.lpi 6cb74c087a demo: rtl: set all lpi to compatibility mode 6 лет назад
demoxhr.lpr d2d2044319 demo: fixed demoxhr, issue 34980 6 лет назад
rtl_demos.lpg f5ec01446e Demo project groups 6 лет назад

README.md

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.