[Lazarus] Lazarus created an lfm form file from the dfm but uses both causing confusion...

Bo Berglund bo.berglund at gmail.com
Fri May 7 02:14:36 CEST 2021


So I have a project with a few forms. It is maintained in SVN and both pas and
dfm files are in SVN.
I have ported the project from Delphi so I have these pas/dfm files.

This week I have modified form layouts by moving stuff around and changing
properties etc. For some reason Lazarus then created lfm form files where the
new layout can be seen. In fact Lazarus uses the lfm files in the IDE...
I did not notice thta tyhis had happened.

Today I had an accident that deleted the code folder completely except for some
remaining files from which I have reconstructed the project using the last SVN
commit and the weekly backup of my PC taken Saturday night too.
Since the commit did not include the lfm files (I was not aware of their
existence) they are not in SVN, but they are in a leftover folder (I cannot say
why it was left there...)

Now I have both dfm and lfm form files in the project folder and it seems like
Lazarus is using the lfm files because I can see my changed layout in Lazarus.
But when I build the project the result is the old layout still.

When I discovered the extra lfm files I renamed the dfm to dfm.bak and then
tried to build the project.
But now it throws up an error complaining that it cannot find the dfm file,
which it has replaced by an lfm file all by itself...

How can I restore order here and tell Lazarus to use the lfm files, which its
editor does but not when Lazarus is building the project. At that time it looks
for the dfm file instead.
In Lazarus I can switch betweeen code and form view and then I see the lfm view.

Lazarus 2.0.12, FPC 3.2.0 on Windows 10


-- 
Bo Berglund
Developer in Sweden



More information about the lazarus mailing list