Recent

Author Topic: dfm to lfm  (Read 2948 times)

johnathan

  • New Member
  • *
  • Posts: 14
dfm to lfm
« on: July 20, 2021, 04:48:10 pm »
Hi
I have been changing my programs to Lazarus from Delphi and have run into  a problem.
Due to a disk corruption I have lost some information on a project.

The code is no problem as I can write this again,  but the form is more difficult.

I have recovered the Dfm file and a list of the components used listed under "type".

The dfm will convert to a lfm with no problems, but do I have to redesign the form again from scratch or is there a way to to generate the form from the information I have.

If you have an answer please be aware of my limited knowledge.

Thanks in hope

john

Thanks for all your replies I will attempt your suggestions and hope for success.

Regrds

John

« Last Edit: July 22, 2021, 03:14:57 pm by johnathan »

JuhaManninen

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 4468
  • I like bugs.
Re: dfm to lfm
« Reply #1 on: July 20, 2021, 05:06:06 pm »
I have recovered the Dfm file and a list of the components used listed under "type".
The dfm will convert to a lfm with no problems, but do I have to redesign the form again from scratch or is there a way to to generate the form from the information I have.
All the layout information is in the dfm file. You can rename it to lfm or use it directly.
In the Pascal file you have the components listed in the form's default (published) section. That is all you need.
« Last Edit: July 20, 2021, 05:10:00 pm by JuhaManninen »
Mostly Lazarus trunk and FPC 3.2 on Manjaro Linux 64-bit.

marcov

  • Administrator
  • Hero Member
  • *
  • Posts: 11453
  • FPC developer.
Re: dfm to lfm
« Reply #2 on: July 20, 2021, 08:48:23 pm »
the component definitions AND the handlers/callbacks/events

JuhaManninen

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 4468
  • I like bugs.
Re: dfm to lfm
« Reply #3 on: July 20, 2021, 09:38:56 pm »
the component definitions AND the handlers/callbacks/events
Yes, event handlers I forgot.
Lazarus IDE can recreate a skeleton handler when you double-click its field in OI. No need to type everything again.
Mostly Lazarus trunk and FPC 3.2 on Manjaro Linux 64-bit.

 

TinyPortal © 2005-2018