Sign in Join

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

Mailing lists / fpc-pascal / 2017-12

fpc2js

9 messages · 4 people · –

Reply by email Subscribe to this list Your subscription

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

Victor Campillo

Hi,

Testing the preview that Michael was so kind to share, I found the next minor problems trying to compile the packages included, I think that everything is related to that the project is work in progress so nothing to worry much about.

 * Package fcl_base
     o The package is configured as "designtime and runtime" and this        cause that the IDE complains about missing register procedure if        you try to install.
     o Inside the folder fcl-base there is a unit called "browserapp"        that is not used in the package which could be correct but I        mention it just in case you forgot to include it in the package.      o It does not include the command to call pas2js compiler.      o Adding the command to call pas2js and changing the package to        runtime just compile fine.
 * Package fcl-db
     o The package include the unit "restconnection" which is missing.      o Just removing restconnection, the package compile without problems.  * Package fpcunit
     o The package include the unit "htmltestreport" which is missing.      o The package is configured as "designtime and runtime" and this        cause that the IDE complains about missing register procedure if        you try to install.
     o It does not include the command to call pas2js compiler.      o Solving the previous remarks, the compilation fails with the message "plaintestreport.pas(166,6) Error: identifier not found "IRound""

I will try to convert a little JavaScript project I have to pascal and use pas2js, I will let you know if I found any problems do it.

Best Regards.

Victor Campillo

Reply by email

Marcos Douglas B. Santos
to Victor Campillo
Victor Campillo wrote 32 lines
Hi, Testing the preview that Michael was so kind to share, I found the next minor problems trying to compile the packages included, I think that everything is related to that the project is work in progress so nothing to worry much about. * Package fcl_base o The package is configured as "designtime and runtime" and this cause that the IDE complains about missing register procedure if you try to install. o Inside the folder fcl-base there is a unit called "browserapp" that is not used in the package which could be correct but I mention it just in case you forgot to include it in the package. o It does not include the command to call pas2js compiler. o Adding the command to call pas2js and changing the package to runtime just compile fine. * Package fcl-db o The package include the unit "restconnection" which is missing. o Just removing restconnection, the package compile without problems. * Package fpcunit o The package include the unit "htmltestreport" which is missing. o The package is configured as "designtime and runtime" and this cause that the IDE complains about missing register procedure if you try to install. o It does not include the command to call pas2js compiler. o Solving the previous remarks, the compilation fails with the message "plaintestreport.pas(166,6) Error: identifier not found "IRound"" I will try to convert a little JavaScript project I have to pascal and use pas2js, I will let you know if I found any problems do it.

Thank you that work!

Best,
Marcos Douglas

Reply by email

Michael Van Canneyt
to Victor Campillo: Testing the preview that Michael was so kind to share, I found the next minor problems…
Victor Campillo wrote 32 lines
Hi, Testing the preview that Michael was so kind to share, I found the next minor problems trying to compile the packages included, I think that everything is related to that the project is work in progress so nothing to worry much about.  * Package fcl_base      o The package is configured as "designtime and runtime" and this        cause that the IDE complains about missing register procedure if        you try to install.      o Inside the folder fcl-base there is a unit called "browserapp"        that is not used in the package which could be correct but I        mention it just in case you forgot to include it in the package.      o It does not include the command to call pas2js compiler.      o Adding the command to call pas2js and changing the package to        runtime just compile fine.  * Package fcl-db      o The package include the unit "restconnection" which is missing.      o Just removing restconnection, the package compile without problems.  * Package fpcunit      o The package include the unit "htmltestreport" which is missing.      o The package is configured as "designtime and runtime" and this        cause that the IDE complains about missing register procedure if        you try to install.      o It does not include the command to call pas2js compiler.      o Solving the previous remarks, the compilation fails with the message "plaintestreport.pas(166,6) Error: identifier not found "IRound"" I will try to convert a little JavaScript project I have to pascal and use pas2js, I will let you know if I found any problems do it.

Thank you very much for your remarks!

I have fixed all issues and re-uploaded the file:
http://www.freepascal.org/~michael/pas2js/pas2js-demo-0.8.37.zip

Michael.

Reply by email

Michael Van Canneyt
to Victor Campillo
Victor Campillo wrote 13 lines
On 06/12/17 14:33, Michael Van Canneyt wrote: > > Thank you very much for your remarks! > > I have fixed all issues and re-uploaded the file: > http://www.freepascal.org/~michael/pas2js/pas2js-demo-0.8.37.zip > Hi Michael, Thank you, now in package fpcunit I get this error. consoletestrunner.pas(300,40) Error: not yet implemented: :TParamsExpr [20170601191003]

Change line 300 to

   for i := low(DefaultLongOpts) to Length(DefaultLongOpts)-1 do

and it should compile again.

Michael.

Reply by email

Victor Campillo
to Michael Van Canneyt
Michael Van Canneyt wrote 8 lines
Change line 300 to   for i := low(DefaultLongOpts) to Length(DefaultLongOpts)-1 do and it should compile again. Michael.

Hi,

Yes, that change solves the problem.

Regarding the rtl package, in the folder rtl there are two units that are not included in the package, contnrs and libjquery.

I don't know if they should be included but I try to include libjquery in the package and it compiles fine, but contnrs fails with the next error.

contnrs.pas(663,34) Error: Pascal element not supported: :TParamsExpr
Victor Campillo

Reply by email

Michael Van Canneyt
to Victor Campillo
Victor Campillo wrote 21 lines
On 06/12/17 15:19, Michael Van Canneyt wrote: > > Change line 300 to > >   for i := low(DefaultLongOpts) to Length(DefaultLongOpts)-1 do > > and it should compile again. > > Michael. Hi, Yes, that change solves the problem. Regarding the rtl package, in the folder rtl there are two units that are not included in the package, contnrs and libjquery. I don't know if they should be included but I try to include libjquery in the package and it compiles fine, but contnrs fails with the next error. contnrs.pas(663,34) Error: Pascal element not supported: :TParamsExpr

I am aware of this problem, this is something Mattias Gaertner needs to look at.

Michael.

Reply by email

Mattias Gaertner
to Victor Campillo: Testing the preview that Michael was so kind to share, I found the next minor problems…
Victor Campillo hat am 6. Dezember 2017 um 12:48 geschrieben: [...] o It does not include the command to call pas2js compiler.

Correct. pas2js does not support ppu files (yet), so it compiles all units everytime. For the same reason the package is set to build manually.

o Adding the command to call pas2js and changing the package to runtime just compile fine.

Yes, but since no one compiles the package manually, it is unnecessary.

Mattias

Reply by email

Victor Campillo
to Mattias Gaertner
Mattias Gaertner wrote
Yes, but since no one compiles the package manually, it is unnecessary.

Hi Mattias,

Yes, it is unnecessary, but I suppose that many people could try to compile the packages as a first approach to the project as I did, just to test if everything compiles without errors.

This weekend I have been playing with pas2js and I liked it very much, so far everything I have done with it works fine, nothing fussy, mostly XMLHttpRequest and DOM.

Keep up the good work guys, coding for the web without the need to do it directly in Javascript is amazing, I don't like the untyped languages.

Best Regards.

Victor Campillo

Reply by email