Forum > Pas2JS
A simple example of pas2js
(1/1)
krolikbest:
Hi,
there is a very simple example of pas2js. I hope someone find it usefull. You don't need http server because the is not used xmlHttpRequest.
Html and css files written in Notepad++, pas2js file in Lazarus 2.2.6. , version of pas2js 2.2.0
TRon:
Thank you for the example krolikbest.
Forever I've been trying to look into the subject of pas2js but, unfortunately there are only so many hours in a day %
Examples like yours help shortening the (learning) curve.
Ñuño_Martínez:
Nice. Thank you. :)
krolikbest:
Thank you, and now this is what came to my mind - I wrote the html in notepad++. I installed html preview plugin for it which makes it easy to quickly preview the 'online' page. Such feature in Lazarus would be nice. So then someone writes in Lazarus html template (for example with testing css) and sees 'online' the effect. The matter is not about pas2js
maxerist:
--- Quote from: TRon on May 08, 2023, 02:48:31 am ---Forever I've been trying to look into the subject of pas2js but, unfortunately there are only so many hours in a day %
--- End quote ---
I assure you, it's much easier than you probably think. In my case I had a Turbo Pascal for Windows project, relatively big, I prepared it for compatibility with modern Delphi/Lazarus. Basically it worked for Win32 target. After extracting all drawing operations into an abstract class, I thought that the next step would be lazarus/linux/gtk2 target, but gave pas2js a chance. And now I didn't regret a single bit. There were obstacles related to how the transplier works and what features it supports. But the majority are manageable.
Navigation
[0] Message Index