Lazarus
Free Pascal => Beginners => Topic started by: Dennis1 on July 22, 2019, 06:35:17 pm
-
I'm working on a simple text editor as I learn Lazarus and Free Pascal. It's been going well. I usually get no errors when I compile -- generally just when I make a typo. But suddenly every control is not recognized and I have over 50 "identifier not found" errors. This was after making one tiny change to a menu caption, which I have since reversed. :o I've checked the "uses" section and nothing has changed. I've tried restarting etc. Nothing.
Any ideas??
-
typo in
?????
Or the string in your menu caption not closed???
Or, or, or ...
Winni
-
It's hard to tell without seeing any code... Please pack your source code (*.pas, *.lfm, *.lpi, *.lpr) files (plus any special data files if needed) into a common zip which you can upload under "Attachment and other options". Do not add compiler-generated file such as the exe, ppu, .o etc because this will make the upload to big.
-
Did you make that change in the lfm file? (usually a NONO) Or in code?
-
I think fixed it. I replaced the header section from a backup and deleted all the menu entries. That removed the avalanche of errors. The only oddity remaining is that the font selection dialogue loads only intermittently. Still, progress!
Thank you to all who responded!
-
After some trial and error to reproduce the problem, I've found that Lazarus seems to intermittently "forget" its forms or controls.
Say I'm changing the width of a Memo box. I type "Memo1." and after the "." the IDE produces a list of relevant methods etc. But only sometimes. Sometimes it has no idea what Memo1 is. Other times I have to type Form1.Memo1 before it remembers. Similarly, a simple line like "Form2.Show" works about half the time when compiled.
It's probably something I'm doing, but what?
-
I never have the issue as you mentioned.
Please provide more information: your OS and Lazarus version, the steps to reproduce. And it's even better if you can provide the sample project.
-
I never have the issue as you mentioned.
Please provide more information: your OS and Lazarus version, the steps to reproduce. And it's even better if you can provide the sample project.
I absolutely agree. Since you are a beginner, the same issue may happen again, and since you did not solve it in a way such that you know what you did, you will get into trouble again. Guaranteed!
-
Yup.
-
I agree!
I've reproduced the error twice. On both occasions, it happened after editing a menu caption and then double-clicking the resulting menu item and populating a new procedure. In both cases, every control on the form instantly became unknown and generated 50 errors. In both cases, it was fixed by shutting down and restarting (ie rebooting, not restarting Lazarus).
-
You till haven't said what operating system you are using and what version of Lazarus you are using.
I've not had the problem you describe in a project with many memos with macOS 14.6, FreeBSD 12 or Ubuntu v18.04, nor with Lazarus v2.0.0 or v2.1.0.
-
Sorry -- it's Win7, Laz 2.0.2 r60954
I'm sure it's something I'm doing. I recompiled Lazarus to include the DCPCiphers and DCPHashes modules ... maybe I screwed something up.