Mgr. Janusz Chmiel wrote 66 lines
Dear elite Pas2js developers,
Please could some one of you try to repair this wrong source code?
It do not react on button click event.
Please, it is not long source code.
Who of us would have The goow wil so this source code could work?
Please send The rrepaired source code.
Thank you very very much for your time.
?
program project1;
?
{$mode objfpc}
?
uses
? BrowserApp, browserconsole, JS, Classes, SysUtils, Web , webwidget, htmlwidgets;
?
type
? TMyApplication = class(TBrowserApplication)
? protected
??? procedure DoRun; override;
procedure butInput( _Sender : TObject; _Event : TJSEvent);
? public
? end;
?
procedure TMyApplication.DoRun;
var
wp: TWebPage;
but: TButtonWidget;
begin
wp:=TWebPage.Create(Self);
wp.Parent:=TViewPort.Create(Nil);
but:=TButtonWidget.Create(Self);
but.Parent:=wp;
but.OnInput := @butInput;
This should be
But.OnClick:= @butInput;
Michael.