Recent

Author Topic: .lfm file shown in the editor, instead of the form.  (Read 280 times)

CM630

  • Hero Member
  • *****
  • Posts: 1436
  • Не съм сигурен, че те разбирам.
    • http://sourceforge.net/u/cm630/profile/
.lfm file shown in the editor, instead of the form.
« on: June 30, 2025, 09:00:53 am »
I open a project. I try to open the main and only form.
When I click on the tab of the form, instead of seeing the source code of the form, the .lfm file is open in another tab.
The app compiles and runs fine.
I suppose that this behaviour is caused by some published properties of the controls used by the form being changed.
But I do not know how to fix the issue. No errors are shown.

Edit: I removed all properties of the suspected control except Left, top, width and height, seved the LFM and reloaded the project. Now the form editor is shown. But what if I did not know what the reason might be?
« Last Edit: June 30, 2025, 09:06:44 am by CM630 »
Лазар 4,0 32 bit (sometimes 64 bit); FPC3,2,2

n7800

  • Sr. Member
  • ****
  • Posts: 399
Re: .lfm file shown in the editor, instead of the form.
« Reply #1 on: June 30, 2025, 01:30:41 pm »
So that developers can find the error, you should share which properties you removed and from which component? Is it your custom component?

Have you saved the file with the error? Maybe you can remove properties one by one to find the specific property that is causing the error.

By the way, in what version of Lazarus was the form created and in which one are you trying to open it?



For now, I assume that the form does have an error, and LFM opens to allow to fix it manually, but incorrectly shows (does not show) the line.

However, it should be noted that usually errors open a separate window, like in #41323, and not editor tab...

CM630

  • Hero Member
  • *****
  • Posts: 1436
  • Не съм сигурен, че те разбирам.
    • http://sourceforge.net/u/cm630/profile/
Re: .lfm file shown in the editor, instead of the form.
« Reply #2 on: June 30, 2025, 02:58:11 pm »
So that developers can find the error, you should share which properties you removed and from which component? Is it your custom component?
It is my custom component. I am not sure what has been removed and what has been added. I mostly added published properties. Most likely I can check the diffs.
But I do not think that anyone would like to install that component.

Have you saved the file with the error? Maybe you can remove properties one by one to find the specific property that is causing the error.
I can remove one by one, but this is because I have a suspicion what might have changed.


By the way, in what version of Lazarus was the form created and in which one are you trying to open it?
Lazarus 4; 32 bit on win10 64 bit.

For now, I assume that the form does have an error, and LFM opens to allow to fix it manually, but incorrectly shows (does not show) the line.

However, it should be noted that usually errors open a separate window, like in #41323, and not editor tab...


EDIT: I recompiled the package. Now the form opens in the editor.
Maybe that explains the issue - there is no error in the code, but the GUI misses some properties.

But on the other hand, I believe that I have recompiled the IDE multiple times for various other packages after the changes.
I start wondering if the package was installed at all. But the app compiled and run.

EDIT2: I removed the package. When I opened the project, it asked me if I wanted to install it, I did. Then it asked me again. Then it showed some error and asked me if I wanted to reload the project. I clicked “Yes”. The project is open correctly.
« Last Edit: June 30, 2025, 03:20:08 pm by CM630 »
Лазар 4,0 32 bit (sometimes 64 bit); FPC3,2,2

 

TinyPortal © 2005-2018