* * *

Author Topic: using DFM in both Delphi and Lazarus  (Read 4242 times)

Phil

  • Hero Member
  • *****
  • Posts: 2316
Re: using DFM in both Delphi and Lazarus
« Reply #15 on: September 20, 2016, 06:59:19 pm »
Back in the day I used the simple DfmToLfm converter here to convert Delphi forms to Lazarus forms:

http://wiki.lazarus.freepascal.org/XDev_Toolkit

The idea is that I would only make form design changes on the Delphi side, then convert the forms whenever I wanted to test with Lazarus.

This also provided a way to correct some LCL deficiencies on Mac, specifically to substitute a Mac font instead of the .dfm font. And also to set some controls' TabStop property to False so that tabbing skips over controls that cannot receive focus on Mac (TButton, TComboBox, TRadioGroup, etc.).

Surely a simple converter from .lfm back to .dfm would be possible too.


tk

  • Sr. Member
  • ****
  • Posts: 354
    • tkweb
Re: using DFM in both Delphi and Lazarus
« Reply #16 on: September 20, 2016, 09:03:06 pm »
But then, why is it necessary to recompile the Lazarus project with Delphi?

We also maintain code to be compilable both in Delphi and Lazarus in some cases. For example, our SW has been developed in Delphi with Alphacontrols, for Win. Since there is no Alphacontrols in Lazarus, the Linux version has native look. We don't want to drop Alphacontrols for Win, so Delphi project is still necessary.

And we use only one dfm for each form. There are some layout problems with this but it is better than maintaining dfm+lfm.
Lazarus 1.7 with FPC 3.1.1.

http://www.tkweb.eu/

PeterX

  • Full Member
  • ***
  • Posts: 241
Re: using DFM in both Delphi and Lazarus
« Reply #17 on: September 20, 2016, 09:07:22 pm »
But then, why is it necessary to recompile the Lazarus project with Delphi?
The Delphi version works.
The Lazarus version is still not usable in real life. Too many regressions.

With the code compiled in Delphi I can ensure that this code is still okay
even though I changed a lot ..
usually using latest Lazarus release version
with Windows 10 at home
and Windows 7 on the job

marcov

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 5827
Re: using DFM in both Delphi and Lazarus
« Reply #18 on: September 20, 2016, 10:46:39 pm »
A simple project setting to leave the forms alone would be best.

I myself use a lot of code between Lazarus and Delphi. Though the GUI ones are mostly test programs for codebases that are shared between them, I also have one zeos application.

But currently there are still too many regression problems that I don't have time to actively pursue.

 

Recent

Get Lazarus at SourceForge.net. Fast, secure and Free Open Source software downloads Open Hub project report for Lazarus