[Pas2js] Pas2js Digest, Vol 27, Issue 1
mister highball
mr.highball at hotmail.com
Sat May 9 17:02:06 CEST 2020
Very nice! Looking forward to trying this out
cheers 🍻,
-highball
________________________________
From: Pas2js <pas2js-bounces at lists.freepascal.org> on behalf of pas2js-request at lists.freepascal.org <pas2js-request at lists.freepascal.org>
Sent: Saturday, May 9, 2020 6:00:01 AM
To: pas2js at lists.freepascal.org <pas2js at lists.freepascal.org>
Subject: Pas2js Digest, Vol 27, Issue 1
Send Pas2js mailing list submissions to
pas2js at lists.freepascal.org
To subscribe or unsubscribe via the World Wide Web, visit
https://lists.freepascal.org/cgi-bin/mailman/listinfo/pas2js
or, via email, send a message with subject or body 'help' to
pas2js-request at lists.freepascal.org
You can reach the person managing the list at
pas2js-owner at lists.freepascal.org
When replying, please edit your Subject line so it is more specific
than "Re: Contents of Pas2js digest..."
Today's Topics:
1. Improved JS-Object to class demo (Michael Van Canneyt)
----------------------------------------------------------------------
Message: 1
Date: Fri, 8 May 2020 14:48:48 +0200 (CEST)
From: Michael Van Canneyt <michael at freepascal.org>
To: pas2js discussions <pas2js at lists.freepascal.org>
Subject: [Pas2js] Improved JS-Object to class demo
Message-ID: <alpine.DEB.2.21.2005081437190.5483 at home>
Content-Type: text/plain; format=flowed; charset=US-ASCII
Hello,
I have improved the Javascript Object-to-Pascal class demo somewhat.
It no longer requires you to recompile the demo, everything can be done
dynamically.
Check it out:
https://www.freepascal.org/~michael/pas2js-demos/genclass/
You can load scripts dynamically
(every URL you type can be loaded with "Load Script");
You can give:
- a path to an object instance (relative to the window instance).
- a pascal class name for the new external definition.
- an external name for the new external definition.
- the parent name for the new external class (by default TJSObject)
When you hit 'Create class', a skeleton pascal code will be generated for you.
For instance, load the following script:
https://uselooper.com/assets/javascript/theme.min.js
Then enter
Object path: Looper
Pascal external class name: Theme
Pascal Class Name : TJSLooper
Hit "Create class" and observe your new external class definition...
The code is of course not perfect, but will help you getting started.
Code is obviously committed in the demos. Suggestions for improvements welcome.
Enjoy !
Michael.
------------------------------
Subject: Digest Footer
_______________________________________________
Pas2js maillist - Pas2js at lists.freepascal.org
https://lists.freepascal.org/cgi-bin/mailman/listinfo/pas2js
------------------------------
End of Pas2js Digest, Vol 27, Issue 1
*************************************
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freepascal.org/pipermail/pas2js/attachments/20200509/504276f4/attachment.htm>
More information about the Pas2js
mailing list