Hi,
it seems that I encountered the same problem as my predecessors (Bazis, sameer). I followed this
https://github.com/pascaldragon/Pas2JS_Widget. I use Lazarus 2.0.10 (installed as fpcupdeluxe), win7 64bit. I tried with pas2js 2.0.0 and 2.0.0 RC8.
Additionally: I set wform1 with button but I was unable to set OnClick event - Error "Unable to create new method. Please fix the error shown in the message window..".
Well, in message window i didn't see any error.Any workaround or suggestion would be appreciated.
Regards,
--------------
Next day
Ok, in the Web unit there is
TJSConsole = class external name 'Console' (TJSObject)
Public
procedure assert(anAssertion : string; Obj1 : JSValue); varargs;
Procedure clear;
procedure count; overload;
procedure count(aCounter : String);
procedure debug(Obj1 : JSValue); //varargs of JSValue; [color=red]I commented this[/color]
procedure error(Obj1 : JSValue); //varargs of JSValue; [color=red] And this[/color]
procedure group; overload;
procedure group(aLabel : String); overload;
procedure groupCollapsed; overload;
procedure groupCollapsed(aLabel : String);overload;
procedure groupEnd;
procedure info(Obj1 : JSValue); //varargs of JSValue; [color=red]And this[/color]
procedure log(Obj1 : JSValue); //varargs of JSValue; [color=red]And this[/color]
.
.
.
and I commented "varargs of JSValue". I don't know why, but after that I was able to create OnClick event and run it. But having on the WForm1 WMemo1 this code
procedure TWForm1.WButton1Click(Sender: TObject);
begin
WMemo1.Lines.Add('ddddd');
end;
doesn't seem to execute.
---
Update to WMemo1, this however works
procedure TWForm1.WButton1Click(Sender: TObject);
begin
wmemo1.clear;
wmemo1.BeginUpdate;
wmemo1.Lines.add('fff');
wmemo1.EndUpdate;
end;
I keep my fingers crossed for pas2js!
Regards,