View Issue Details

IDProjectCategoryView StatusLast Update
0029644LazarusLCLpublic2020-04-17 07:52
ReporterBambang Pranoto Assigned ToMattias Gaertner  
Status assignedResolutionopen 
Summary0029644: Renaming control at parent class form does not propagate to the children class which are not open at source editor
DescriptionSee Steps to reproduce below
Steps To Reproduce1. Create a new project
2. Rename Form1 to ParentForm and save the unit as parent.pas
3. Place a Button at ParentForm, let it gets the default name Button1.
4. Create a descendant form via File -> New -> Inherited Project Component
5. Change the caption and the name of the descendant form to 'ChildForm'
6. Change the caption of Button1 at ChildForm to ChildButton *** IMPORTANT ***
6. Save the new unit as child.pas
7. CLOSE child.pas *** IMPORTANT ****

Now, go back to ParentForm:

8. add uses child at the implementation section
9. Add OnClick event of Button1:

   procedure TParentForm.Button1Click(Sender: TObject);

10. Rename Button1 to Buttonx
11. Compile and run.
12. The program will fail. Error message is Ancestor class for "Button1" not found.
Additional InformationThe 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.
TagsNo tags attached.
Fixed in Revision
Attached Files


related to 0036920 closedJuha Manninen Delete a component from Ancestor form causes IDE hangs in all inherited forms from this parent 


Bambang Pranoto

2016-02-12 14:55


Bambang Pranoto

2016-02-12 15:23


Juha Manninen

2016-02-14 11:59

developer   ~0090006

> 8. add uses child at the implementation section

What is that step for?

I also don't think this depends on QT widgetset.

Bambang Pranoto

2016-02-14 17:18

reporter   ~0090014

Because we need to call ChildForm.Show() and ChildForm is defined in child.pas

Yes, I think it is not related to QT

Issue History

Date Modified Username Field Change
2016-02-12 14:55 Bambang Pranoto New Issue
2016-02-12 14:55 Bambang Pranoto File Added:
2016-02-12 15:23 Bambang Pranoto File Added: Screenshot from 2016-02-12 20:47:29.png
2016-02-12 16:38 Mattias Gaertner Assigned To => Mattias Gaertner
2016-02-12 16:38 Mattias Gaertner Status new => assigned
2016-02-14 11:59 Juha Manninen Note Added: 0090006
2016-02-14 13:57 Zeljan Rikalo LazTarget => -
2016-02-14 13:57 Zeljan Rikalo Widgetset QT =>
2016-02-14 17:18 Bambang Pranoto Note Added: 0090014
2020-04-17 07:52 Juha Manninen Relationship added related to 0036920