Sign in Join

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

Mailing lists / pas2js / 2020-09

browserconsole unit enhancement new idea

5 messages · 2 people ·

Reply by email Subscribe to this list Your subscription

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

Mgr. Janusz Chmiel

I AM thinkink, if it would be possible to add special function or procedure to browserconsole unit, which would.
Which would allow developer to find out The index number of The text block, which have been created by using writeln command. If user would click on some text block which have been created by writeln, special procedure or function could return The line number.
This could be used for A Beginners to create text only GUi based on The semantic meanings of Thw worlds created by writeln. For example. User would click on The start word which have been previously created by using writeln. And other part of .pas source could detect if user have clicked on this word.
This idea have been imspired by RFO Basic Java language Basic language interpreter for Android, which have contained Print command and other. There was special function which has allowed user to find The line where user have clicked on The output console.
May be, that this is not possible in Javascript language. BUt I Am only thinkink and asking if this feature would be implemented.

Reply by email

Michael Van Canneyt
to Mgr. Janusz Chmiel
Mgr. Janusz Chmiel wrote 17 lines
I AM thinkink, if it would be possible to add special function or procedure to browserconsole unit, which would. Which would allow developer to find out The index number of The text block, which have been created by using writeln command. If user would click on some text block which have been created by writeln, special procedure or function could return The line number. This could be used for A Beginners to create text only GUi based on The semantic meanings of Thw worlds created by writeln. For example. User would click on The start word which have been previously created by using writeln. And other part of .pas source could detect if user have clicked on this word. This idea have been imspired by RFO Basic Java language Basic language interpreter for Android, which have contained Print command and other. There was special function which has allowed user to find The line where user have clicked on The output console. May be, that this is not possible in Javascript language. BUt I Am only thinkink and asking if this feature would be implemented.

This is definitely possible, but the question is how to calculate the line number: is this the total linenumber (which can become really big) or the line number of the currently displayed lines, or maybe both.

And should the line number be 1 based or zero based ?

Michael.

Reply by email

Mgr. Janusz Chmiel
to Michael Van Canneyt

I think that line numbering could start from 1. And to calculate line number. I think that The best is to only take The index number beause some long Writeln block of text could take more than 1 physical lines. Sure, it would be possible to also allow to detect real number and text block index number. The most simplest approach would be ideal, because if you could create this new function or procedure, it would allow Me to write simple WEB apps by using Pas2js. And if you will find some Javascript code to create input box by using readln () it will be Themost simplest way to develop some simple app without various WEB widgets. One programmer have created special code co convert WQbasic apps to Javascript. He is using some Javascript code to create input box which must be always confirmed by pressing OK button.

Reply by email

Michael Van Canneyt
to Mgr. Janusz Chmiel
Mgr. Janusz Chmiel wrote 12 lines
I think that line numbering could start from 1. And to calculate line number. I think that The best is to only take The index number beause some long Writeln block of text could take more than 1 physical lines. Sure, it would be possible to also allow to detect real number and text block index number. The most simplest approach would be ideal, because if you could create this new function or procedure, it would allow Me to write simple WEB apps by using Pas2js. And if you will find some Javascript code to create input box by using readln () it will be Themost simplest way to develop some simple app without various WEB widgets. One programmer have created special code co convert WQbasic apps to Javascript. He is using some Javascript code to create input box which must be always confirmed by pressing OK button.

Since a long time I'm interested in supporting readln(). Can you give a reference to this code ?

Michael.

Reply by email