I have compiled yours examples successfully. To avoid issues with finding units, I have placed all files from Src to The folder with LTR units from PAS2jS. Code also work. I will study yours unit. Sure, I know, that there are no so much object types like in HTMlwidgets unit. But for beginning, it is good for testing.
What will happen if I will not add object position values in some cases when this value is expected?
Mailing lists / pas2js / 2020-10
Nyx framework
11 messages · 2 people · –
- MMgr. Janusz Chmiel 7
- Mmister highball 4
Reply by email Subscribe to this list Your subscription
Read-only archive. Use j and k to move between messages.
Dear MR highball,
Please could you add yours samples to The Nyx Github repo so all source files could be normally loaded by using git clone? When I have followed yours links to download The samples, It open WeB interface, and rav button open source code. But it would be very confort if you would try to add those samples to The Github repository with Nyx framework.
Fortunately The GUI which is being produced by yours units are fully accessible with screen readers similarly like GUI which have been created thanks to htmlwidgets.
Yes all the sample code listed were just links inside of the repo to a particular line of source. The repo can be cloned using the below command
Git clone https://github.com/mr-highball/nyx --recursive
The recursive flag will pull the submodule too (just some css used in the tester application) In the nyx_browser_test.lpr starting at line 158 in method forum, you can comment out the different samples procedures. ________________________________
Earlier message 240 lines
I have used yours cloning command. But I have found out strange issue. Screen reader do not show any GUi when I have opened C:\nyx\test\nyx_browser_test.html
No button, no strange issue.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freepascal.org/pipermail/pas2js/attachments/20201003/fcd9f4e8/attachment.htm>
Make sure you compile the project first since the gui components will only show with the compiled javascript present. Also make sure one of the methods (starting at line 158 of the project) are uncommented (example BuildUi or one of the "simple test" methods).
________________________________
Earlier message 48 lines
How complex would be to extend yours units so labels could be added to every editable field?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freepascal.org/pipermail/pas2js/attachments/20201006/d5b76e6d/attachment.htm>
How complex would be to extend yours units so > labels could be added to every editable field?
Would be simple, I'll put together an example for you and reply when I have it
cheers 🍻,
-highball
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freepascal.org/pipermail/pas2js/attachments/20201008/6c660088/attachment.htm>
Thank you very much. I Am always using The latest Pas2JS compiler from trunk branch.
This compiler and units have allowed Me to finally create quiz which can monitor even 40 editable fields at The same time. The advantage of this approach is, that it is not necessary to fill out questions chronologically. Respondent can decide The order. Respondent is not being forced to confirm The right answer by using some confirmation button or by even pressing Enter key.
It is excellent dynamic process. Even screen readers are not negatively slow down by The fact, that Javascript code monitor so many fields at The same time.
It is even possible to use Pascal language to play live MP3 streams. It is miracle algorithm. Because it is possible to create apps from live Internet radio players to complex WEB applications.
Really I Am very very haapy thanks to Pas2jS and useful units, which extends its usability to create really professional WEB apps. I like build in run-time engine, which can inform in The case of some error. -------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freepascal.org/pipermail/pas2js/attachments/20201008/61db2af5/attachment.htm>
I would never been able to create quizes without The working code from MR suziau. MR Jean Suziau. Thanks to his routine, code can be very simple. It have not been necessary to declare new variable for every editable field. If I would not login to this mailing list, my dream could never come true.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freepascal.org/pipermail/pas2js/attachments/20201008/568a3360/attachment.htm>
Thank you very much. I Am always using The latest Pas2JS compiler from trunk branch. This…
Thank you very much for yours sample code. If I understand it right. When i would want to use this framework to get text from some inputboxes, it is also necessary to use some event procedure. And function gettext may be return text from inputbox value.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freepascal.org/pipermail/pas2js/attachments/20201010/3d5b0f37/attachment-0001.htm>
Thank you very much for yours sample code. If I understand it right. When i would want to use this framework to get text from some inputboxes, it is also necessary to use some event procedure. And function gettext may be return text from inputbox value.
You wouldn't necessarily have to use events, that is just one way. You could loop through a container's Elements collection and get the text from there, but I've updated my demo to include a debug text box which shows how you can get all of the text at once when any of the inputs change.
I've also added 3 methods showing one way to capture this text,
(*
this method will take TStrings (TStringList or other) and fill
it up with "question" and "answer". The "question" will be stored
in the "name" and the "answer" will be stored as a value
*)
procedure AllInputTextToStrings(const AContent : TStrings); (*
this method will return a single string with the question following
by an answer. an optional question separator string can be used
but will default to separate with a hyphen
*)
function AllInputTextToString(const AQuestionSeparator : String = '-') : String;
(*
returns all of the inputs content without including the question as
a single string
*)
function AllInputContentOnlyToString : String;In the "BuildUI" method, I've hooked up observation methods for when the inputs' text changes (this line here)
.ForEach(@AddTextChangeObserverToInputs);The AddTextChangeObserverToInputs shows how one could attach a handler to respond when a user makes a change (this will trigger on every key up). In my demo the observer will just set the debug text to all the questions and the current answer, but you can attach as many different observers to property changes as you would like.
When doing this demo I had to also fix some bugs found, so just re-pull the repo and you'll have working code.
Again, this demo is found here
https://github.com/mr-highball/nyx/tree/master/demos/browser/input-labels
Hope this helps, and if you need to reach out via personal email feel free. -------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freepascal.org/pipermail/pas2js/attachments/20201010/11465618/attachment-0001.htm>
