Sign in Join

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

Mailing lists / pas2js / 2020-08

A simple Pas2JS IDE running in the browser

6 messages · 4 people · –

Reply by email Subscribe to this list Your subscription

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

Stephen Wright

Hi

I have just read the discussion on building Apps for the visually impaired.

We have a simple IDE for Pas2JS that runs in the browser. It can be found here (http://www-users.york.ac.uk/~smw572/XIDE.html). It is only tested in Chrome but should also run well in the new Microsoft Edge.

I am not sure how relevant it is to your task and maybe you have already found a good solution. If not feel free to try out XIDE to see if it helps.

Good luck with your project.

Regards Steve

P.S. the demo project that XIDE comes with is a maths exercise for my PhD. To get rid of it and see the IDE without the clutter press “System/Clear” at the top left of the screen. Also the “Help” button gives full details of the operation of the IDE. Finally you can see the demo running by pressing the“Run Mode” button again at the top left corner of the screen.

On Wednesday, 26 August 2020, 11:00:18 BST, 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: is it possible to create GUi with no need to manually add       the code to .html page (Mgr. Janusz Chmiel)

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

Message: 1
Date: Wed, 26 Aug 2020 09:59:25 +0200
From: "Mgr. Janusz Chmiel"
To: "'pas2js discussions'"
Subject: Re: [Pas2js] is it possible to create GUi with no need to     manually add the code to .html page
Message-ID: <260309AA395A400F883EF74680D2B53D at DESKTOPN6LG1HQ> Content-Type: text/plain;    charset="us-ascii"

Dear MR Van Canneyt and MR SUZINEAU,
    Thank you for yours very positive access to my pleas. I can say viola! Because page really show button and it is perfectly screen reader accessible code. And really, thanks to htmlwidgets it is really possible to create GUI elements directly by using Pascal source code no need to add manually HTMl code to .html file. Very very well done. And I will be patiently waiting for AN demos because I must also learn how to react on click on object activation, there will be very probably click procedure inside htmlwidgets unit.

So thank you again.
As A visually impaired man with no sight at all, I have one important question.
Because I will not be able to specify width or height object properties, what will happen, if I would create for example 25 buttons. WWhen I will not specify number object position values. I know, that very probably, my code will not look very attractive for sighted WEB app audience. But important for Me is, if Java script code can not crash in this case. Important is, that screen reader can access HTMl objects which will be created by using htmlwidgets unit.

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

Subject: Digest Footer

Mgr. Janusz Chmiel
to Stephen Wright

Dear MR Wright,
Yours project is good solution. I will deeply analyse it. Now I have started to deeply study htmlwidgets unit. I must make several standalone .txt files which will contain.
All widget related classes.
All procedures and all functions.

Because without that, I would never be able to use this crucial unit successfully.
Htmlwidgets create fully accessible WEB widgets. Including multiline editable box, one line editable box, Radio button, button, input button and some block of text.
I AM very nicely impressed because of The state of development, where Pas2js is.
To be honest, without existence of htmlwidgets unit, I would not be so overjoyed because of Pas2js. Because I would had to llearn HTMl language firstly to create HTMl page with some buttons, editable fields, etc. And then, I would had to use web.pas unit to analyse on which element user have clicked from Pascal source.
Fortunately for Me, MR Michael Van Canneyt have developed outstanding htmlwidgets unit.
And this unit have brought a joy of using Pascal to write interactive WEB apps. Sure. I Am on The beginning first. So there will be some time before I will deeply familiar with his unit.
But what I know is, that I have big chance to create WEB apps for visually impaired users.
If I will not specify setwidth, setheight after I will create every widget, I know, that I can not have A ilusion, that My resulting Webpage GUI will look very attractive for The sighted majority. Fortunately, htmlwidgets support allignment of every object.
So thanks to alligment procedure, I hope, that result will be acceptable. I have tried to write Pascal apps for Android.
But it was not very easy for Me. And WEB apps are The future. Thank you for yours project.

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

Mgr. Janusz Chmiel
to Mgr. Janusz Chmiel

I Am using Trunk release of Lazarus with
C:\laztrunk\components\pas2js\pas2jsdsgn.lpk package installed I AM also running trunk release of Pas2js with wonderful htmlwidget unit. I have also found The algorithm how to add text to A WEB page. I will be able to create interactive WEB apps with forms, Radio buttons. I AM very very satisfied. YOurs IDE is fully accessible. And I only do not know how to save source code to my harddisk when I would create one by using it. Ide uses also some HTML tags. Which unit do you are use to create WEB widgets?
NOWI AM facing complex problem. Where to get free domain and some little space to host .html and .js file produced by Pas2js. I do not need PHP, Mysql and other server based tehnologyes, which are offered by many domain services.
I would only need some space to host .html file and .js file. BUt I know, that finding it free of charge will be rather science fiction in todays world.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freepascal.org/pipermail/pas2js/attachments/20200826/5ed14b18/attachment.htm>

Jean SUZINEAU
to Mgr. Janusz Chmiel

Personnaly, for my last publication I used github gh-pages: http://jsuzineau.github.io/pascal_o_r_mapping/jsFrequences/

If you create a github account with a public repository, you can get this for free.

https://docs.github.com/en/github/working-with-github-pages/creating-a-github-pages-site

You'll need to learn to use git. On Windows, TortoiseGit is comfortable to use, integrated with File Explorer.

git is great to manage the evolution of your work.

Stephen Wright
to Mgr. Janusz Chmiel: Yours project is good solution. I will deeply analyse it. Now I have started to deeply…

Hi Janusz

I am a little confused about the Pas2JS mailing lists because you have copied me in on your reply to "pas2js-discussions" list while I am on the "pas2js-request" list. In general I prefer to communicate through the mailing list, but maybe I need to join this other mailing list?

Anyway if you do look at XIDE here are some things that might help you to get started......

1) It is a "Web First" approach based on standard HTML components. These are wrapped in order to expose a common subset of properties in an object inspector panel that can then be emulated in Lazarus (using the standard Lazarus widget set wrapped to provide web like behaviour) This allows the core functionality from our browser app to be run in Windows and Linux without needing to change any code.

The exception to this is CSS style rules for widget appearance. because we use standard HTML components they can use full CSS capability. (if running on the browser - we have not attempted to replicate this in windows or Linux). Because CSS can be complex we provide a Style Designer that allows you to add new style rules, select targets widgets and properties using drag and drop. (see the UI/Code/Style designer tabs at the top left of the screen)

2) We only allow UI layout using horizontal and vertical layout boxes. Because these can be nested to any depth this is still quite flexible and has the advantage of allowing percentage values in height and width values so the resulting UI will dynamically react to different screen (or window) sizes.

3) To save and load your project use the system menu and save to the clipboard (if you want to save to disk) or local storage (if you want to work on multiple projects and save them between sessions). If you want to share the IDE with someone, or host it on your own website then use the "System/Deploy" option to get the full IDE. This is a single page web app that runs fully client side. (it is a static HTML page from a server perspective) hence hosting can be very cheap or free.

4) To add code to your widgets, in the UI designer, select the widget you are interested in on the UI Designer tree. Below that tree there will appear two tabs. A properties tab to allow editing of any property, and an events tab. If you select the events tab the list of supported events for that widget will be listed. To the right of each event there is an ellipsis button. Pressing that button takes you to a code editor where you can edit the code for that event. (After creation these events will also be listed in the code designer so you then have a choice of ways to go to the event code)

I understand you have very impaired, or no sight and am curious how you manage to cope with an IDE like this which is very visual in its drag and drop approach to making it easier to code simple web apps.

I hope this helps.

Regards Steve
On Wednesday, 26 August 2020, 21:45:19 BST, Mgr. Janusz Chmiel wrote:

Dear MR Wright,    Yours project is good solution. I will deeply analyse it. Now I have started to deeply study htmlwidgets unit. I must make several standalone .txt files which will contain.All widget related classes.All procedures and all functions. Because without that, I would never be able to use this crucial unit successfully.Htmlwidgets create fully accessible WEB widgets. Including multiline editable box, one line editable box, Radio button, button, input button and some block of text.I AM very nicely impressed because of The state of development, where Pas2js is.To be honest, without existence of htmlwidgets unit, I would not be so overjoyed because of Pas2js. Because I would had to llearn HTMl language firstly to create HTMl page with some buttons, editable fields, etc. And then, I would had to use web.pas unit to analyse on which element user have clicked from Pascal source.Fortunately for Me, MR Michael Van Canneyt have developed outstanding htmlwidgets unit.And this unit have brought a joy of using Pascal to write interactive WEB apps. Sure. I Am on The beginning first. So there will be some time before I will deeply familiar with his unit.But what I know is, that I have big chance to create WEB apps for visually impaired users.If I will not specify setwidth, setheight after I will create every widget, I know, that I can not have A ilusion, that My resulting Webpage GUI will look very attractive for The sighted majority. Fortunately, htmlwidgets support allignment of every object.So thanks to alligment procedure, I hope, that result will be acceptable. I have tried to write Pascal apps for Android.But it was not very easy for Me. And WEB apps are The future.Thank you for yours project.  -------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freepascal.org/pipermail/pas2js/attachments/20200827/56d8ffb3/attachment.htm>

Sven Barth
to Stephen Wright
Stephen Wright wrote
I am a little confused about the Pas2JS mailing lists because you have copied me in on your reply to "pas2js-discussions" list while I am on the "pas2js-request" list. In general I prefer to communicate through the mailing list, but maybe I need to join this other mailing list?

There is only one pas2js mailing list provided by the FPC servers, namely you have it named it "pas2js
request" in your e-mail client while Janusz has named it "pas2js discussions"?

Regards,
Sven