<html xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40"><head><meta http-equiv=Content-Type content="text/html; charset=utf-8"><meta name=Generator content="Microsoft Word 15 (filtered medium)"><style><!--
/* Font Definitions */
@font-face
{font-family:"Cambria Math";
panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
{font-family:Calibri;
panose-1:2 15 5 2 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0cm;
font-size:11.0pt;
font-family:"Calibri",sans-serif;}
a:link, span.MsoHyperlink
{mso-style-priority:99;
color:blue;
text-decoration:underline;}
.MsoChpDefault
{mso-style-type:export-only;}
@page WordSection1
{size:612.0pt 792.0pt;
margin:70.85pt 70.85pt 70.85pt 70.85pt;}
div.WordSection1
{page:WordSection1;}
--></style></head><body lang=CS link=blue vlink="#954F72" style='word-wrap:break-word'><div class=WordSection1><p class=MsoNormal>Dear elite Pas2js developers,</p><p class=MsoNormal>Please could some one of you try to repair this wrong source code?</p><p class=MsoNormal>It do not react on button click event.</p><p class=MsoNormal>Please, it is not long source code.</p><p class=MsoNormal>Who of us would have The goow wil so this source code could work?</p><p class=MsoNormal>Please send The rrepaired source code.</p><p class=MsoNormal>Thank you very very much for your time.</p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>program project1;</p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>{$mode objfpc}</p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>uses</p><p class=MsoNormal> BrowserApp, browserconsole, JS, Classes, SysUtils, Web , webwidget, htmlwidgets;</p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>type</p><p class=MsoNormal> TMyApplication = class(TBrowserApplication)</p><p class=MsoNormal> protected</p><p class=MsoNormal> procedure DoRun; override;</p><p class=MsoNormal> procedure butInput( _Sender : TObject; _Event : TJSEvent);</p><p class=MsoNormal> public</p><p class=MsoNormal> end;</p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>procedure TMyApplication.DoRun;</p><p class=MsoNormal>var</p><p class=MsoNormal> wp: TWebPage;</p><p class=MsoNormal>but: TButtonWidget;</p><p class=MsoNormal>begin</p><p class=MsoNormal> wp:=TWebPage.Create(Self);</p><p class=MsoNormal>wp.Parent:=TViewPort.Create(Nil);</p><p class=MsoNormal>but:=TButtonWidget.Create(Self);</p><p class=MsoNormal>but.Parent:=wp;</p><p class=MsoNormal>but.OnInput := @butInput;</p><p class=MsoNormal>but.Text:='Click Me';</p><p class=MsoNormal>but.Refresh;</p><p class=MsoNormal>wp.Refresh;</p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>end;</p><p class=MsoNormal>procedure TMyApplication .butInput( _Sender: TObject; _Event: TJSEvent);</p><p class=MsoNormal>begin</p><p class=MsoNormal> MaxConsoleLines := 1;</p><p class=MsoNormal>writeln ('Hello!');</p><p class=MsoNormal>end;</p><p class=MsoNormal>var</p><p class=MsoNormal> Application : TMyApplication;</p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>begin</p><p class=MsoNormal> Application:=TMyApplication.Create(nil);</p><p class=MsoNormal> Application.Initialize;</p><p class=MsoNormal> Application.Run;</p><p class=MsoNormal>end.</p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>Odesláno z aplikace <a href="https://go.microsoft.com/fwlink/?LinkId=550986">Pošta</a> pro Windows</p><p class=MsoNormal><o:p> </o:p></p></div></body></html>