Forum > LCL

[SOLVED]Lost graphic of Form1

(1/2) > >>

muonman:
I have been using Lazarus for many years on and off and it is excellent, well done all developers. I have recently returned to a project shelved 5 years ago and am continuing development steadily with no issues other than my own ineptitude. My program is working fine BUT in the IDE I cannot  find the graphic of one of my forms although it displays and functions at run-time. I noticed it when I wanted to add an item to a TCombobox and could not find the Form. I edited the code in the .frm file to no effect and had to edit the text in the .lrs file which is not ideal. Any thoughts?

Blaazen:
I don't understand. What graphic is lost? What Form you cannot find?

You can go to Project -> Forms ... and open it. Also, open Project Inspector and check if all files are there. Or check Paths in Project Options (node Compiler Options -> Paths).

muonman:
A little more detail is needed.  I designed and built a package of 8 forms several years ago. At that time it was possible to click Project > Forms... and see all my forms listed (Form1 to Form8) Today the program works fine but if I try and locate Form1 in order to modify it its form is nowhere to be found (so far) Clicking Project > Forms... lists Form2 to Form8. The files Form1.(lrs,lfm,pas,o) are all present in the project directory OK.

lucamar:

--- Quote from: muonman on November 21, 2018, 03:56:42 pm ---[...] Clicking Project > Forms... lists Form2 to Form8. The files Form1.(lrs,lfm,pas,o) are all present in the project directory OK.

--- End quote ---

If the files are really there you can try to re-add the form to the project in the Project inspector.

To make sure there's no problem with Form1.lfm/Form1.pas use "File ->Open" to open Form1.lfm and then whack F12 a couple times to pass from the form in the editor to the form in the designer and, finally, to the source Unit1.pas in the editor.

muonman:
Thanks for the hints. To avoid confusion the working name of Form1 in my package is Main.
I loaded Main.frm and Main.pas and from Main.frm in the editor tried the F12 toggle which yielded the following error:

>Unable to find the component class "TLTCPComponent" It is not registered via RegisterClass and no lfmwas found. It is needed by unit: /home/nigel/GPI/main.pas

I can compile and run my package and the TCP component is clearly there because all my network functions work??
I have to confess to not fully understanding the Registering concept in Lazarus, I thought it was a concept left behind with MS Windows but I am only a physicist :)

Navigation

[0] Message Index

[#] Next page

Go to full version