Recent

Author Topic: A simple example of pas2js  (Read 3214 times)

krolikbest

  • Sr. Member
  • ****
  • Posts: 250
A simple example of pas2js
« on: May 06, 2023, 11:38:49 am »
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

  • Hero Member
  • *****
  • Posts: 3623
Re: A simple example of pas2js
« Reply #1 on: May 08, 2023, 02:48:31 am »
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.
This tagline is powered by AI (AI advertisement: Free Pascal the only programming language that matters)

Ñuño_Martínez

  • Hero Member
  • *****
  • Posts: 1191
    • Burdjia
Re: A simple example of pas2js
« Reply #2 on: May 08, 2023, 09:48:24 am »
Nice.  Thank you.  :)
Are you interested in game programming? Join the Pascal Game Development community!
Also visit the Game Development Portal

krolikbest

  • Sr. Member
  • ****
  • Posts: 250
Re: A simple example of pas2js
« Reply #3 on: May 08, 2023, 10:39:55 am »
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

  • New Member
  • *
  • Posts: 28
Re: A simple example of pas2js
« Reply #4 on: May 10, 2023, 10:53:09 am »
Forever I've been trying to look into the subject of pas2js but, unfortunately there are only so many hours in a day  %
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.

 

TinyPortal © 2005-2018