[Pas2js] PAS2JSDSGN project Options
warleyalex
warleyalex at yahoo.com.br
Sat Dec 8 12:36:36 CET 2018
-------------------------------------------------------
program project1;
{$mode objfpc}
uses
Classes, SysUtils, JS, Web, pas2js.Forms, unit1;
begin
// Your code here
Application.Initialize;
Application.CreateForm(TWebForm1, WebForm1);
Application.Run;
end.
-------------------------------------------------------
unit Unit1;
{$ifdef fpc}
{$mode objfpc}
{$endif}
interface
uses
SysUtils, Classes, JS, Web, Types, Math,
pas2js.Color, WebCtrls
{ you can add units after this };
type
{ TWebForm1 }
TWebForm1 = class(TWebForm)
private
{ Private declarations }
protected
{ Protected declarations }
procedure LoadLfmToPas; override;
public
{ Public declarations }
end;
var
WebForm1: TWebForm1;
implementation
{$R *.lfm}
procedure TWebForm1.LoadLfmToPas;
begin
console.log('TWebForm1.LoadLfmToPas');
inherited;
{$I WebForm1.lfm.inc}
end;
end.
-------------------------------------------------------
We use the PAS2JSDSGN to create the basic structure of the web app with
forms.
==============
[x] Files
--> project1.lpr
--> project1.html
--> unit1.html
--> unit1.pas
[x] Required Packages
===============
a) using the original PAS2JSDSGN package settings, it works as expected!
b) When I drag'n drop a visual TWebButton component into the Lazarus
designer,
It auto adds the" webcomponents" as Required Packages.
When you compile, you've got:
Compile package FCL 1.0.1: Exit code 2, Errors: 1
Fatal: unknown parameter "-gl". Use -h for help.
c) If I delete the "webcomponents" package from the project:
Delete dependencies for webcomponents? Yes
it works as expected! I can see the button and the console.
d) If I drag'n drop another component, f.i. a TWebMemo into the desginer, It
auto adds the" webcomponents" as Required Packages.
I have to delete the "webcomponents" package to compile. ...and so on.
I see the Project Options --> Compiler Commands --> the following settings:
----------------------------------------
->Execute Before
Call On: [x]Compile [x]Build [x]run
Command:
->Compiler
Call On: [x]Compile [x]Build [x]run
Command: $(pas2js)
-> Execute After
Call On: [x]Compile [x]Build [x]run
Command:
-----------------------------------------
--
Sent from: http://pas2js.38893.n8.nabble.com/
More information about the Pas2js
mailing list