[Pas2js] is it possible to create GUi with no need to manually add the code to .html page
Mgr. Janusz Chmiel
janusz.chmiel at volny.cz
Mon Aug 24 22:30:55 CEST 2020
Here is my wrong code.
program Project1;
{$mode objfpc}
uses
browserapp, JS, Classes, SysUtils, Web, webwidget;
type
TMyApplication = class(TBrowserApplication)
procedure doRun; override;
end;
procedure TMyApplication.doRun;
begin
FMyPage:=TWebPage.Create(Self);
FMyButton:=TButtonWidget.Create(Self);
FMyButton.Parent:=FMyPage;
FMyButton.Text:='Start The code';
Terminate;
end;
var
Application : TMyApplication;
begin
Application:=TMyApplication.Create(nil);
Application.Initialize;
Application.Run;
Application.Free;
end.
I Am getting The following error
project1.lpr(17,3) Error: identifier not found "FMyPage"
But where to declare The variable FMyPage and which data type should I
assign it?
More information about the Pas2js
mailing list