[Pas2js] LFM-to-PAS on-the-fly

Mattias Gaertner nc-gaertnma at netcologne.de
Tue Apr 10 01:15:39 CEST 2018


> warleyalex via Pas2js hat am 10. April 2018 um 00:45 geschrieben:
>[...]
> I've watched a TMS Web Core video on youtube, when you compile a
> WebApplication, actually you can see an Delphi executable but that
> executable is actually do nothing else then something that jumps starts the
> browser on the right place.
> 
> ...desperately, trying to mimic that example, but now using the Lazarus IDE,

Why not simply open a browser on Run?
Maybe TMS uses the exe only because of some shortcoming of the Delphi IDE?

>[...]
> The serialization mechanism (LFM-TO-PAS) comes from the TCompWriterPas
> classes, however, before hand, I have to register all forms classes manually
> to serialize the .LFM forms (since we have to pass a form instance to
> TStreamAsPasForm to create and initialize the components).

The idea of TCompWriterPas is to write the .inc file when the form is saved, i.e. when the lfm is saved.
Are you trying to convert an existing Delphi project to a webapp? 


>[...]I believe the mecanism to
> integrate LFM resource {$R *.lfm} maybe is not a good idea since can add
> some overhead in the JS.

Yes. lfm are not made for small executables.

Mattias


More information about the Pas2js mailing list