Renaming control at parent class form does not propagate to the children class which are not open at source editor
Original Reporter info from Mantis: bpranoto
-
Reporter name: Bambang Pranoto
Original Reporter info from Mantis: bpranoto
- Reporter name: Bambang Pranoto
Description:
See Steps to reproduce below
Steps to reproduce:
- Create a new project
- Rename Form1 to ParentForm and save the unit as parent.pas
- Place a Button at ParentForm, let it gets the default name Button1.
- Create a descendant form via File -> New -> Inherited Project Component
- Change the caption and the name of the descendant form to 'ChildForm'
- Change the caption of Button1 at ChildForm to ChildButton *** IMPORTANT ***
- Save the new unit as child.pas
- CLOSE child.pas *** IMPORTANT ****
Now, go back to ParentForm:
- add uses child at the implementation section
- Add OnClick event of Button1:
procedure TParentForm.Button1Click(Sender: TObject);
begin
ChildForm.Show;
end;
- Rename Button1 to Buttonx
- Compile and run.
- The program will fail. Error message is Ancestor class for "Button1" not found.
Additional information:
The problem is when the name of the button renamed, it should also rename the children class. It does, but only for the children which are opened at the editor.
I attach the the resulting errorneous project.
Mantis conversion info:
- Mantis ID: 29644
- OS: Ubuntu
- OS Build: 12.04
- Build: 1.6RC2
- Platform: Linux
- Monitored by: » bpranoto (Bambang Pranoto)