[Lazarus] SOLVED - RE: Lazarus updates dfm not lfm and changes to form NOT being shown at run time.

Peter Williams pewilliams2010 at live.com
Sat Mar 19 17:25:01 CET 2011


Hi Mattias,

> Date: Sat, 19 Mar 2011 07:49:14 +0100
> From: nc-gaertnma at netcologne.de
> To: lazarus at lists.lazarus.freepascal.org
> 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 <pewilliams2010 at live.com> 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
> --
> _______________________________________________
> Lazarus mailing list
> Lazarus at lists.lazarus.freepascal.org
> http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
 		 	   		  
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus-ide.org/pipermail/lazarus/attachments/20110320/75fceffd/attachment-0003.html>


More information about the Lazarus mailing list