[Pas2js] A simple Pas2JS IDE running in the browser

Stephen Wright stephenmichaelwright at yahoo.co.uk
Thu Aug 27 10:05:25 CEST 2020

 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 <janusz.chmiel at volny.cz> 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>

More information about the Pas2js mailing list