Archive for the ‘Lazarus Pascal’ Category

Project raised exception class “EReadError” invalid value for property

Wednesday, January 2nd, 2013

We were working with Lazarus 0.9.30 on Windows. Then after a few edits on a pretty large project, we suddenly got the following error on trying to compile and run.

Project raised exception class “EReadError” invalid value for property

Ideally this would suggest that you are trying to assign a value to a property that is not compatible. But in our case it was different.

The cause of the problem and its solution…

Usually when you double-click a text box on the form, it creates a default event with code for the OnChange event. Since this was not needed, the code for the OnChange event was removed (by hand) as a means of cleaning up.

But the IDE did not take care of the rest of the clean up. i.e., In the properties window for the text box, the OnChange event was still referring to the code. So we had to manually do this as well by deleting that reference in the properties window.

And the moment we did this, it compiled just fine.

First, we hope that you find this useful in debugging your code that brings up this error. Second, if you’ve encountered this error for a different reason, we’d like to hear about that.

Please confine yourself to the identical error. If you have any question apart from this, please use our forum.

Happy coding!