<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>
<body>
<div dir="auto" style="direction: ltr; margin: 0; padding: 0; font-family: sans-serif; font-size: 11pt; color: black; ">
Very nice! Looking forward to trying this out<br>
<br>
</div>
<div dir="auto" style="direction: ltr; margin: 0; padding: 0; font-family: sans-serif; font-size: 11pt; color: black; ">
<span id="OutlookSignature">
<div dir="auto" style="direction: ltr; margin: 0; padding: 0; font-family: sans-serif; font-size: 11pt; color: black; ">
cheers 🍻,<br>
</div>
<div dir="auto" style="direction: ltr; margin: 0; padding: 0; font-family: sans-serif; font-size: 11pt; color: black; ">
-highball</div>
</span><br>
</div>
<hr style="display:inline-block;width:98%" tabindex="-1">
<div id="divRplyFwdMsg" dir="ltr"><font face="Calibri, sans-serif" style="font-size:11pt" color="#000000"><b>From:</b> Pas2js <pas2js-bounces@lists.freepascal.org> on behalf of pas2js-request@lists.freepascal.org <pas2js-request@lists.freepascal.org><br>
<b>Sent:</b> Saturday, May 9, 2020 6:00:01 AM<br>
<b>To:</b> pas2js@lists.freepascal.org <pas2js@lists.freepascal.org><br>
<b>Subject:</b> Pas2js Digest, Vol 27, Issue 1</font>
<div> </div>
</div>
<div class="BodyFragment"><font size="2"><span style="font-size:11pt;">
<div class="PlainText">Send Pas2js mailing list submissions to<br>
pas2js@lists.freepascal.org<br>
<br>
To subscribe or unsubscribe via the World Wide Web, visit<br>
<a href="https://lists.freepascal.org/cgi-bin/mailman/listinfo/pas2js">https://lists.freepascal.org/cgi-bin/mailman/listinfo/pas2js</a><br>
or, via email, send a message with subject or body 'help' to<br>
pas2js-request@lists.freepascal.org<br>
<br>
You can reach the person managing the list at<br>
pas2js-owner@lists.freepascal.org<br>
<br>
When replying, please edit your Subject line so it is more specific<br>
than "Re: Contents of Pas2js digest..."<br>
<br>
<br>
Today's Topics:<br>
<br>
1. Improved JS-Object to class demo (Michael Van Canneyt)<br>
<br>
<br>
----------------------------------------------------------------------<br>
<br>
Message: 1<br>
Date: Fri, 8 May 2020 14:48:48 +0200 (CEST)<br>
From: Michael Van Canneyt <michael@freepascal.org><br>
To: pas2js discussions <pas2js@lists.freepascal.org><br>
Subject: [Pas2js] Improved JS-Object to class demo<br>
Message-ID: <alpine.DEB.2.21.2005081437190.5483@home><br>
Content-Type: text/plain; format=flowed; charset=US-ASCII<br>
<br>
<br>
Hello,<br>
<br>
I have improved the Javascript Object-to-Pascal class demo somewhat.<br>
<br>
It no longer requires you to recompile the demo, everything can be done<br>
dynamically.<br>
<br>
Check it out:<br>
<br>
<a href="https://www.freepascal.org/~michael/pas2js-demos/genclass/">https://www.freepascal.org/~michael/pas2js-demos/genclass/</a><br>
<br>
You can load scripts dynamically <br>
(every URL you type can be loaded with "Load Script");<br>
<br>
You can give: <br>
- a path to an object instance (relative to the window instance).<br>
- a pascal class name for the new external definition.<br>
- an external name for the new external definition.<br>
- the parent name for the new external class (by default TJSObject)<br>
<br>
When you hit 'Create class', a skeleton pascal code will be generated for you.<br>
<br>
For instance, load the following script:<br>
<br>
<a href="https://uselooper.com/assets/javascript/theme.min.js">https://uselooper.com/assets/javascript/theme.min.js</a><br>
<br>
Then enter<br>
Object path: Looper<br>
Pascal external class name: Theme<br>
Pascal Class Name : TJSLooper<br>
<br>
Hit "Create class" and observe your new external class definition...<br>
The code is of course not perfect, but will help you getting started.<br>
<br>
Code is obviously committed in the demos. Suggestions for improvements welcome.<br>
<br>
Enjoy !<br>
<br>
Michael.<br>
<br>
<br>
------------------------------<br>
<br>
Subject: Digest Footer<br>
<br>
_______________________________________________<br>
Pas2js maillist - Pas2js@lists.freepascal.org<br>
<a href="https://lists.freepascal.org/cgi-bin/mailman/listinfo/pas2js">https://lists.freepascal.org/cgi-bin/mailman/listinfo/pas2js</a><br>
<br>
<br>
------------------------------<br>
<br>
End of Pas2js Digest, Vol 27, Issue 1<br>
*************************************<br>
</div>
</span></font></div>
</body>
</html>