[Pas2js] TMS Web Clone
warleyalex
warleyalex at yahoo.com.br
Thu Mar 1 00:31:46 CET 2018
Mini TMS Web Demo Lazarus Prototype
=============================
Just analyzing the TMS Web Core framework JS output, and and quite a bit of
effort, doing some reverve engineering. Just out of curiosity, without
looking the source code, it's a little mess, anyway.
Here is the mini version:
download link:
https://www.dropbox.com/s/f4yh50tfcz3abbl/TMSWEBClonePrototype.rar?dl=0
-----------------------------------------------------------------------------------------
*Issues:*
======
a) how to get the module name from the Lazarus IDE?
I usually create custom name for the the main HTML, for instance,
"projWEBForms.html". I've been thinking how to get its name.
When you create a form at the project source, e.g.
Application.CreateForm(TForm1, Form1);
Since the variable reference "Form1" was defined at Unit1.pas. TMSWeb is
using a UnitName method from the RTL: AInstanceClass.UnitName + cHTMLExt;
==> so you have to define "Unit1.html" instead of "projWEBForms.html".
b) How to get the project name available in a unit, the wierd WEBLib.Runner
is using a delphi environment variable
'http://localhost:8000/$(ProjectName)'. It would be nice to have
$Name($(ProjFile)) available in pas2js unit.
c) I didn't test the TMS Web, but I thing he's using RTTI methods tricks to
get .dfm values to auto generate the "LoadDFMValues" method. TReader/TWriter
to generate .pas code instead of a .dfm is nice!
d) I was unable to register the components from the WEBLib.StdCtrls (this
unit contains TWebLabel, TWebEdit, TWebButton, TWebComboBox) on Lazarus IDE.
Sorry, I've never created a lazarus component before, just been thinking:
how to register the "web" components?
procedure Register;
begin
RegisterComponents('Web',[TWebLabel, TWebButton, TWebEdit, TWebComboBox,
TWebMemo]);
end;
--
Sent from: http://pas2js.38893.n8.nabble.com/
More information about the Pas2js
mailing list