On Wed, 8 Nov 2017, Leonardo M. Ramé via Lazarus wrote:
El 08/11/17 a las 04:57, Michael Van Canneyt via Lazarus escribió:
There is.
Normally, early december a RC version of pas2js will be released.
pasjs currently is more or less at the level of D7 compatibility (minus
interfaces and
pointers). There is a web-based compiler (i.e. you can do 'hot reload'
as found in many
web development systems) etc.
Many basic RTL units work, there is access to all browser features or
node.js. you can import any javascript library (e.g. jquery is available)
using an import unit.
TDataset now also works, pas2js will ship with simple REST connection and
JSON Dataset components.
In short, everything to develop Pascal programs that run in the browser:
FPC will be a full development stack for web applications.
It will also be fully integrated in Lazarus.
Michael.
Hi Michael, I wonder how the import unit is created. For example, I use
a library called Tabulator (a fantastic grid) I would like to interface
with pas2js, should I do the interface by hand or is there an automatic
method?.
There is a unit that can partially do it for you. It will create an external
class definition in pascal based on a javascript object instance.
But it is limited in the sense that you will need to provide types
and names of arguments to functions. (javascript does not make them
available)
I did the units web/js/libjquery by hand, from documentation.
Michael.
--
_______________________________________________
Lazarus mailing list
[email protected]
https://lists.lazarus-ide.org/listinfo/lazarus