Problem with local variables named MenuItem1 and the IDE Menu designer
Original Reporter info from Mantis: bpranoto
-
Reporter name: Bambang Pranoto
Original Reporter info from Mantis: bpranoto
- Reporter name: Bambang Pranoto
Description:
When adding menu with the Menu Editor, all local variables with name MenuItem1 are replaced
Steps to reproduce:
-
Create a new blank application
-
Drop a TMainMenu component onto the form
-
Write constructor code as follow:
constructor TForm1.Create(AOwner: TComponent);
var
MenuItem1 : TMenuItem;
begin
inherited Create(AOwner);
end;
-
Double click the MainMenu1 in the form to lauch the menu designer
-
Add a MenuItem, in the object properties change the name from MenuItem1 to MenuItemFile
-
The local variable MenuItem1 inside the constructor also changed name to MenuItemFile which then triggers the compilation error.
Mantis conversion info:
- Mantis ID: 38059
- OS: Ubuntu
- OS Build: 18.04 - 64bits
- Build: SVN Revision: 64096M
- Platform: Linux
- Version: 2.0.10
- Monitored by: » @JuhaManninen (Juha Manninen), » bpranoto (Bambang Pranoto)