[Pas2js] Pas2js 0.9.31
Mattias Gaertner
nc-gaertnma at netcologne.de
Fri Jul 13 15:56:59 CEST 2018
On Fri, 13 Jul 2018 08:43:40 -0500 (CDT)
warleyalex via Pas2js <pas2js at lists.freepascal.org> wrote:
> a) When I compile a project using document.getElementsByClassName I always
> get the
> --> Error: identifier not found "getElementsByClassName"
> There's a minor type at the web unit:
> function getElementsyClassName(aNames : string) : TJSHTMLCollection;
Thanks for the hint. Fixed.
> b) To be able to work with pas2js, the Lazarus IDE needs to be told where
> the source files are.
... which can be done by adding the packages as dependencies or via -Fu
in pas2js.cfg. You don't need to compile the packages as pas2js
compiles needed files automatically anyway.
> I usually compile the 4 packages. The
> fpcunit_pas2js.lpk package does not compile anymore.
> ---------------------------------------------
> Package fpcunit_pas2js 1.0: Executing command before: Exit code 217, Errors:
> 25
> Panic: Pas2JS Compiler version 0.9.31+beta [2018/07/10] for Win32 i386
> Panic: Copyright (c) 2018 Mattias Gaertner and others
> Panic: C:\fpc2js\pas2js-windows-0.9.31\packages\fcl-base\custapp.pas(63,37)
> Hint: (4501) Parameter "Sender" not used
> Panic: Info: (129) 19071 lines in 20 files compiled, 1.3 secs
> Panic: An unhandled exception occurred at $004420AD:
> Panic: Exception:
> Panic: $004420AD
Confirmed.
> d) In a experimental project I've got a mysterious "Fatal: Compilation
> aborted", there is no errors displayed in the console. It could be many
> things: Delphi code causing exceptions; DOM manipulations causing errors;
> not implemented feature, etc.
The compiler does no DOM manipulations.
Delphi code would give an error message.
Not implemented feature would give an error message.
> Any thoughts?
Can you compile the compiler from trunk and use gdb to get a backtrace?
> In a future can be a feasible
> solution:
>
> console.log(AError.AMessage+#13+AError.AFile+#13+{%LINE%}+':{%COL%}+#13+AError.AStack);
Of course that is there. If you don't see any error it means something
strange has happened.
Mattias
More information about the Pas2js
mailing list