Reputation: 15384
When I update the name of an object in the Object Inspector (e.g., fruitsList: TListBox;
becomes foodList: TListBox;
), is there way to have it update all references to it as well?
The events that are attached to this object are of course renamed appropriately, but I've got other references to it in the code that are not.
I'd like to correct things like this that are littered through the codebase I'm working on.
fruitsList.Enabled := FALSE;
Is this something I can do in one operation? Or am I stuck renaming it in the Object inspector, flipping over to the Code view, recreating the variable on the form, and then using Refactor->Rename to complete the task for the 47 references to fruitsList through the code?
Upvotes: 3
Views: 518
Reputation: 5453
If you use the Rename refactor in the code editor on a control, it will rename all references in the code and rename the instance in the DFM file. Or at least it does in XE2.
Upvotes: 7