When I am refactoring and I rename some identifiers of types that are tied to a form's *.lfm file, the configuration gets messed up and the project is still compilable but not runable anymore. To resolve, I need to close the IDE, go to the project folder, search the lfm file and then manually edit the top line to the new name, then startup the IDE again.
In such cases not even editing the lfm file inside the IDE works (Tools->Check LFM file in Editor), because the change will be overwritten by the compile process again ("somehow"?). Therefore the IDE shutdown and external editing to force a reread of the fixed lfm file.
Example:
Go into a form's unit and find the variable declaration below the type section
var
Form1: TForm1;
Try these tests:
(1) Try to rename the type part of that definition from TForm1 to TFormXY using the refactoring Find/Rename identifier dialog. Then try to run -> Missing resource error, needs lfm-file fixing.
Also
(2) Change the name of the variable from Form1 to FormXY by using the dialog. Then try to run -> will work, but in the Object Inspector the name is still the old one.
(3) Using the Object Inspector and change the name from Form1 to FormXYZ and try to run -> This renames a lot of places but it misses to rename in the lpr-file where the Application.CreateForm() takes place.
I run into this issue(s) quite a lot. Can this be improved?
Pretty Please