Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / pas2js / 2023-02

Pas2js Digest, Vol 55, Issue 3

11 messages · 3 people · –

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Stephen Wright

Hi Janusz
Thankyou for your kind opinion of? Xide and Xcomponents.?I am sorry to hear that you are having problems compiling XComponents from Lazarus.? We developed and tested it on Lazarus version 2.1.0 and FPC version 3.3.1. and have notes in https://github.com/Steve--W/XComponents/blob/master/readme.md on how to compile it. Unfortunately, we are not in a position to provide detail support beyond the GitHub notes. However I am all too aware of the effort and frustrations involved in building packages for enterprise level environments like Lazarus. This is the reason that the XIDE environment runs as a stand alone utility as this allows us to radically simplify the installation and learning curve involved. For example, as you are probably aware, XIDE can compile itself to generate a static HTML file that runs on Chrome in the browser (on line or off line) with no need for any installation or configuration.? Hence you can go to an example of XIDE on the web (e.g https://steve--w.github.io/XIDEPages/XIDEPascalSVGAndGPUExample.html) right click on "view page source" copy that HTML text save it to a local file and then run it in chrome, hit the "System" and "Clear" options and you then have you own clean copy of XIDE/XComponents ready to develop your own apps for the web. The only reason for compiling XIDE from Lazarus is if you wish to customize ?or debug?any of the components, or you want to generate the .exe version of XIDE to run under windows. (but we can send you a pre-compiled snapshot .exe file if you wish and if Michael et al are prepared to forward a .exe) Our motivation in developing XIDE as a "Browser First"? entry level development environment was primarily to support my PhD research as we found the conventional tools available for web development to be fragmented and overly complex. We also hoped it might introduce some Python users to the merits of FPC. (I am using it on a daily basis for my research into robust mathematical modelling for economics and finance and I am very pleased with the ease of use in this role.) The downside of our radical simplification is that we do not provide the levels of cosmetic customization, security and universal browser compatibility needed for enterprise level public facing web apps. (e.g. we only test on Chrome.) I hope this helps with your project, and wish you all success in future Regards Steve_W

On Tuesday, 7 February 2023 at 11:00:03 GMT, wrote:

Send Pas2js mailing list submissions to
???

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 ???

You can reach the person managing the list at
???

When replying, please edit your Subject line so it is more specific than "Re: Contents of Pas2js digest..."

Today's Topics:

? 1. Re: How to insert inline {} (Michael Van Canneyt) ? 2. Re: How to insert inline {} (Ondrej Pokorny)
? 3. how to add xide and xcomponents package to lazarus ? ? ? (Mgr. Janusz Chmiel)

----------------------------------------------------------------------

Message: 1
Date: Mon, 6 Feb 2023 14:30:14 +0100 (CET)
From: Michael Van Canneyt
To: Ondrej Pokorny via Pas2js
Subject: Re: [Pas2js] How to insert inline {}
Message-ID: <alpine.DEB.2.22.394.2302061427001.287683 at home> Content-Type: text/plain; charset="utf-8"; Format="flowed"

Ondrej Pokorny wrote 21 lines
Hello, I'd like to use the DateTimePicker from https://getdatepicker.com . I declared an external class ? TJSTempusDominus = class external name 'tempusDominus.TempusDominus'(TJSObject) ? public ??? constructor new(aElement: TJSElement); ??? constructor new(aElement: TJSElement; aOptions: TJSObject); ? end; a simple constructor without options works fine: ? fDateTimePicker := TJSTempusDominus.new(myElement); Can I somehow add inline options { my-property: false }? JS-code: window.datetimepicker1 = new tempusDominus.TempusDominus( ? document.getElementById('datetimepicker1'), { my-property: false } );

Seems I missed this mail. So a late reply

How I do this usually, using new:

window.datetimepicker1 = new tempusDominus.TempusDominus(
? ? document.getElementById('datetimepicker1'), new(['my-property',false]));

You can recurse:
new([
? 'my-property',false,
? 'headers', new(
? ? ? ['content-type','application/json',
? ? ? ? 'authorization','basic ABC'
? ? ? ])
? ? ]);

The new() function exists in the JS unit.

Michael.

------------------------------

Message: 2
Date: Mon, 6 Feb 2023 18:53:13 +0100
From: Ondrej Pokorny
To:
Subject: Re: [Pas2js] How to insert inline {}
Message-ID:
Content-Type: text/plain; charset=UTF-8; format=flowed

Michael Van Canneyt wrote 42 lines
On Thu, 26 Jan 2023, Ondrej Pokorny via Pas2js wrote: > Hello, > > I'd like to use the DateTimePicker from https://getdatepicker.com . > > I declared an external class > ? TJSTempusDominus = class external name > 'tempusDominus.TempusDominus'(TJSObject) > ? public > ??? constructor new(aElement: TJSElement); > ??? constructor new(aElement: TJSElement; aOptions: TJSObject); > ? end; > > a simple constructor without options works fine: > > ? fDateTimePicker := TJSTempusDominus.new(myElement); > > Can I somehow add inline options { my-property: false }? > > JS-code: > window.datetimepicker1 = new tempusDominus.TempusDominus( > ? document.getElementById('datetimepicker1'), { my-property: false } ); Seems I missed this mail. So a late reply How I do this usually, using new: window.datetimepicker1 = new tempusDominus.TempusDominus( ?? document.getElementById('datetimepicker1'), new(['my-property',false])); You can recurse: new([ ? 'my-property',false, ? 'headers', new( ????? ['content-type','application/json', ?????? 'authorization','basic ABC' ????? ]) ?? ]); The new() function exists in the JS unit.

Great, thank you Michael!

I couldn't find it myself and ended up with TJSTempusDominusOptions = class external name 'Object'(TJSObject). Now I can make it simpler.

Ondrej

------------------------------

Message: 3
Date: Tue, 7 Feb 2023 10:30:05 +0100
From: "Mgr. Janusz Chmiel"
To: pas2js discussions
Subject: [Pas2js] how to add xide and xcomponents package to lazarus Message-ID:
Content-Type: text/plain; charset="utf-8"

Xide and Xcomponents can not be installed easily and build with Lazarus. Even when I have tried to use latest stable FPCUP deluxe there are compilation errors. I have found out, that Xide and Xcomponents are very probably The best opensource solutions to write WEB apps by using Rapid applications developments. Sure, there is also Pas2widgets components from Helios and his cooperators. Could somebody prebuild Lazarus with Xide and Xcomponents? It would bring a joy to souls of many Pascal developers.

It is so positive feeling if it is possible to create Web apps by using components list and events list? Thank you very much for yours reactions.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freepascal.org/pipermail/pas2js/attachments/20230207/385fb963/attachment-0001.htm>

------------------------------

Subject: Digest Footer

Mgr. Janusz Chmiel
to Stephen Wright

Dear MR doctor Wright,
Thank you for your professional programmers support. I have followed your professional advice and I allready have my own build environment in standalone .html file. I will explore it and I will be hoping, that I will be able to use Czech UTF8 encoding characters in textual app output. Unfortunately, Pas2js widgets did not allow Me to use such characters. This is The reason why I have chosen your Xide and I have also found out, that Xide support much more GUI widgets.

I will try to create simple app with some textual Widget and I will try if Czech characters will be usable on A output.

It have been so positive to use Pascal language, which I like so much.

Its procedural style is for Me as a visually impaired man much more easy to understand than when using modern non procedural languages such as Javascript.

Thanks to RAPID GUi designer, I could finally create my first Czech Internet radios player. Sure, there are so many radio players on The WEB, but I like to start with Internet radio player because I can learn new units or programming language how to react on button press. Unfortunately, I will be never able to develop professionally looking WEB apps, because GUI designers will not allow Me to not position GUI widgets by using my eyes, so resulting GUI will be very often unusable. Only screen readers can use such GUI thanks to calling of object libraryes which are not making problems, that GDI output is corrupted.

Sure, I could develop like MR Wancane but it is not so easy for Me like using GUI designers. But I will accept my role caused by my blindness and I will stop to be sad because of it. I can use all GUI with screen readers including Android screen readers, Orca for Linux and NVDA. And this is positive. If Czech encoding will not be supported, may be, that some elite developers such as you, or MR Matias or MR Wancane will try to fix such issues.Thank you for your support again dear MR doctor Wright and I Am wishing much programmers and personal successes to you.With The deepest possible appreciation and with The kindness regards.

Janusz Chmiel
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freepascal.org/pipermail/pas2js/attachments/20230207/6753e0ed/attachment-0001.htm>

Mgr. Janusz Chmiel
to Stephen Wright: Hi Janusz Thankyou for your kind opinion of? Xide and Xcomponents.?I am sorry to hear…

Czech characters are being stored perfectly whe I have changed Hint. Unfortunately, I will be forced to use Lazarus and its build in components list to access GUI elements. Because on WEB, when I choose some GUI element and when I press Enter on it or Space key, it very probably do not add to form. SO I will have to be patient and build on Lazarus. But you have created really profssional group of widgets and all are fully accessible with screen reader. SO I can tell you only very well done. When I Am using Lazarus components list, I always use components filter to display only The needed components. I pess Enter on some comonent and component is immediately placed automatically on The form. And I can even use create default event for some GUi element.

I can not find Lazarus version which you are using for building, really, it is not on sourceforge and even Fpcup Deluxe do not list such version. It woul be enough if somebody of us could send Me download link for Lazarus version which have been used for building XXcomponents. I will be able to use all GUI components thanks to components tree in Lazarus. -------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freepascal.org/pipermail/pas2js/attachments/20230207/84d2ecae/attachment.htm>

Mgr. Janusz Chmiel
to Stephen Wright: Hi Janusz Thankyou for your kind opinion of? Xide and Xcomponents.?I am sorry to hear…

Dear MR doctor Wright,

Please could you help me to overcome The fact, that I can not build Chromium framework support? I only need Xcomponents, I do not need Xide. Lazarus is really The onlyone way to code GUI elements effectively with screen reader. Unfortunately, I do not know how to simply force FPC to ignore all Xcomponents source code parts which are something to do with Chromium ramework.

Fortunately, I have been able to build Iframe.

Is it possible to disable Chromium support or it is not enabled by default so I would had to manu?ly remove all references to The Chromium support from Xcomponents source code?

Or can i use Notepad to edit some files to force FPC to ignore all Chromium references from Xcomponents source code?

If manual approach is needed, I can prepare for a long programmers lines deletions. Thank you for your help.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freepascal.org/pipermail/pas2js/attachments/20230223/bb363c1f/attachment.htm>

Mgr. Janusz Chmiel
to Mgr. Janusz Chmiel

I have been able to install The XXcomponents package successfully. Fortunately, I could install Iframe and I could also remove The directive from .lpk file so Chromium based compilation have not been applied. And I can use Xcomponents now thanks to The project template provided. So Thank you for your programmers work.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freepascal.org/pipermail/pas2js/attachments/20230223/9caa01e8/attachment.htm>

Mgr. Janusz Chmiel
to Mattias Gaertner

Dear Mr Gaertner,
Textual output in Czech is not support when such textual strings are stored in .lfm files. I Am sending a little Internet radio player example based on MR Wancares player. Here is also opened issue about this probl?m.

https://gitlab.com/freepascal.org/fpc/pas2js/-/issues/38898

May be, that elite Pas2js dedevelopers will be able to solve this issue. Thank you for your time and work.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freepascal.org/pipermail/pas2js/attachments/20230224/25c0b66e/attachment-0001.htm> -------------- next part --------------
A non-text attachment was scrubbed...
Name: sampleproject.zip
Type: application/zip
Size: 504216 bytes
Desc: not available
URL: <http://lists.freepascal.org/pipermail/pas2js/attachments/20230224/25c0b66e/attachment-0001.zip>

Mgr. Janusz Chmiel
to Mattias Gaertner: On Tue, 7 Feb 2023 21:08:50 +0100 As pas2js supports Unicode, you have to be more…

I will be using on Run-time GUi textual element assignment proces. So I will be using Form to create every GUI element and I will add textual assignment for every previously created GUI elements on Run-time. It should work. -------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freepascal.org/pipermail/pas2js/attachments/20230224/7cb50dd7/attachment.htm>

Mgr. Janusz Chmiel
to Mgr. Janusz Chmiel
{$modeswitch unicodestrings}

Odesl?no z aplikace Po?ta pro Windows

Od: Mgr. Janusz Chmiel via Pas2js
Odesl?no:p?tek 24. ?nora 2023 11:39
Komu: pas2js discussions
Kopie: Mgr. Janusz Chmiel
P?edm?t: Re: [Pas2js] Pas2js Digest, Vol 55, Issue 3

Does have some sense to add

Directive to The source code so .lfm content will be encoded correctly?Or it do not help?

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freepascal.org/pipermail/pas2js/attachments/20230224/d320cdaa/attachment-0001.htm>

Mattias Gaertner
to Mgr. Janusz Chmiel
{$modeswitch unicodestrings}

That controls the type "String", which is in pas2js always UnicodeString. It has no effect on lfm.

Show quoted text 12 lines
Odesl?no z aplikace Po?ta pro Windows Od: Mgr. Janusz Chmiel via Pas2js Odesl?no:p?tek 24. ?nora 2023 11:39 Komu: pas2js discussions Kopie: Mgr. Janusz Chmiel P?edm?t: Re: [Pas2js] Pas2js Digest, Vol 55, Issue 3 Does have some sense to add Directive to The source code so .lfm content will be encoded correctly?Or it do not help?

Is your lfm encoded in UTF-8? It should be.

Mattias