[Pas2js] pas2js app debugging

Michael Van Canneyt michael at freepascal.org
Sat Feb 24 16:27:39 CET 2018



On Sat, 24 Feb 2018, Mr Bee via Pas2js wrote:

> pas2js v.0.8.39 from your repo works with fpc v.3.0.4. I think support for
> fpc stable is really important because most people use it rather than the
> trunk. Especially since pas2js is now officially being part of fpc project.

I don't understand. 
The sources of pas2js are in FPC trunk, so it can only depend on trunk...

>
> Check the browserconsole unit. For the moment, it just allows writeln() to
>> write to a "console",
>> My plan was to improve it so it can also do a 'readln' - this should be
>> fairly easy.
>>
>
> I think I better wait for the official version. :)
>
> A CRT unit would just need to define a matrix of DIV elements <div
>> id="crt_r1"><div id="crt_1_1></div>...<div id="crt_80_1></div></div>, and
>> set the inner html of the correct div. Using CSS color can be easily
>> simulated.
>>
>
> What about a full CRT compatibility? Including the readkey(), keypressed(),
> clrscr(), etc. Is it possible?

I am sure it can, but I have no desire to spend time on this.

A basic read/write is as far as I am prepared to go.

I will accept patches for a CRT unit, but will not spend time on this.

> I'm also thinking about Graph unit as well, but more modern than classic
> Graph unit.

It should be possible.

>
> If you want to take a shot at it, and need help/ideas, just ask.
>>
>
> Actually, my javascript is very poor. In fact, I hate it. That's why pas2js
> is really interesting to me.

You don't need javascript at all. 
The web unit gives you full access to the DOM and to all browser events, 
right from Pascal.

You will need maybe 1 routine that actually reads/writes a DOM element node,
but that's it.

If you want I can write something basic, and let you finish it :)

>
> BTW. Please mail with your correct address to the mailing list, you are
>> subscribed with a gmail address, but your posts are with a yahoo address.
>> Now I need to moderate your messages...
>
>
> I'm really sorry for that. It's my mistake, I should have subscribed with
> the yahoo mail. The yahoo mail has better username but I prefer gmail
> service so I forward all yahoo mail to gmail and reply from gmail. I didn't
> realize it would be a problem for a mailing list. I just subscribed with
> both email address, I hope that would fix the problem. I apologize for the
> inconvenience that I made.

No problem at all, good that you fixed it !

Michael.


More information about the Pas2js mailing list