Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / lazarus / 2011-03

Lazarus updates dfm not lfm and changes to form NOT being shown at run time.

3 messages · 2 people ·

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Peter Williams

Hi All,
I have a Lazarus project which I ported from a Delphi one. It has 2 units with a form each e.g. unit1, form1 & unit2, form2. I used the Tools conversations menu items to convert it and the forms and units. It all works fine except that when I change form1, then changes are made to form1.dfm and not to form1.lfm. Can someone please help me check out why the wrong form is being updated. I know this because when I edit form1, and run it, the changes do not appear when I run it. I see the form1.lfm which has not been changed. It seems that form1.dfm is getting changed. Best Regards,Peter / pew
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus.freepascal.org/pipermail/lazarus/attachments/20110319/75d5eb29/attachment.html>

Reply by email

Mattias Gaertner
to Peter Williams
Show quoted text 5 lines
Hi All, I have a Lazarus project which I ported from a Delphi one. It has 2 units with a form each e.g. unit1, form1 & unit2, form2. I used the Tools conversations menu items to convert it and the forms and units. It all works fine except that when I change form1, then changes are made to form1.dfm and not to form1.lfm. Can someone please help me check out why the wrong form is being updated. I know this because when I edit form1, and run it, the changes do not appear when I run it. I see the form1.lfm which has not been changed. It seems that form1.dfm is getting changed.

When the IDE opens/saves a form it first searches for a file with the same name as the unit but with the extension '.lfm'. If this is not found it searches for a '.dfm'.
I just tested with a form1.pas, form1.lfm and form1.dfm: only the form1.lfm was changed.

Please try this:
rename the form1.dfm to form1.dfm_old
Then edit the form. Do you get any error? What file is changed?

Mattias

Reply by email

Peter Williams
to Mattias Gaertner

Hi Mattias,

Show quoted text 23 lines
Date: Sat, 19 Mar 2011 07:49:14 +0100 From: To: Subject: Re: [Lazarus] Lazarus updates dfm not lfm and changes to form NOT being shown at run time. On Sat, 19 Mar 2011 11:10:26 +1100 Peter Williams wrote: > > Hi All, > I have a Lazarus project which I ported from a Delphi one. It has 2 units with a form each e.g. unit1, form1 & unit2, form2. I used the Tools conversations menu items to convert it and the forms and units. > It all works fine except that when I change form1, then changes are made to form1.dfm and not to form1.lfm. > Can someone please help me check out why the wrong form is being updated. I know this because when I edit form1, and run it, the changes do not appear when I run it. I see the form1.lfm which has not been changed. It seems that form1.dfm is getting changed. When the IDE opens/saves a form it first searches for a file with the same name as the unit but with the extension '.lfm'. If this is not found it searches for a '.dfm'. I just tested with a form1.pas, form1.lfm and form1.dfm: only the form1.lfm was changed. Please try this: rename the form1.dfm to form1.dfm_old Then edit the form. Do you get any error? What file is changed?

Everything now works as expected. I found that in unit1.pas there was a {$R *.dfm} statement which I needed to change to {$R *.lfm}. I appears that the Tool for converting Delphi DFM forms to Lazarus LFM forms needs to be updated so that it's unit then has a {$R *.lfm} statement instead of the dfm one.

Mattias

PEW

Show quoted text 5 lines
-- _______________________________________________ Lazarus mailing list http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus.freepascal.org/pipermail/lazarus/attachments/20110320/75fceffd/attachment.html>

Reply by email