Sign in Join

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

Mailing lists / pas2js / 2024-08

please try to repair this wrong source code

2 messages · 2 people · –

Reply by email Subscribe to this list Your subscription

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

Michael Van Canneyt
to Mgr. Janusz Chmiel
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.