[fpc-pascal] Developing a mini ERP / web based development

Michael Van Canneyt michael at freepascal.org
Fri Jun 28 01:21:44 CEST 2019



On Fri, 28 Jun 2019, Darius Blaszyk wrote:

>> pas2js is used as the basis for TMS Web Core (a commercial product for
>> Delphi/lazarus. pas2js is meanwhile very mature. (I use it myself
>> extensively :))
>> You must use this if you wish to include a lot of browser-side
>> functionality.
>>
> What do you mean, jQuery for instance? I have been trying to get pas2js
> running today, but I was unsuccefull until now. All I get are empty (or
> near empty) pages.

That is correct. For many demos, the results are shown in the browser's
developer console.

> I installed version 1.4.8 and setup the PATH env
> variable to the bin folder. Compiling the demo's did result in the
> following error:
>
> webcompiler/demowebcompiler.lpr(6,27) Error: can't find unit "webfilecache"
> Fatal: Compilation aborted
> make: *** [Makefile:36: demowebcompiler] Error 6

I tested, it compiles with pas2js trunk. We'll need to check the 1.4.8
installer.

>
> The demo's that were compiled, I tried to open locally and from the cgi-bin
> folder, but no succes. For instance the demobar example only shows:
>
> TChartJS Create bar charts using Pas2JS & ChartJS (view source <demobar.lpr>
> )

It works here. What do you see in the debug console ?

>
> Also the nodejs hello world example mentioned on the wiki crashes. I have
> no idea what goes wrong or how to debug.

I guess that you'll first need to acquaint yourself with web programming
before attempting to use pas2js, and in particular how to debug using the
browser. Even if you use TMS Web Compiler, that is a must.


Michael.


More information about the fpc-pascal mailing list