Icon View Thread

The following is the text of the current message along with any replies.
Messages 1 to 4 of 4 total
Thread Build 15: Issue with TMenu Items.
Wed, Jun 17 2020 6:54 PMPermanent Link

Steve Gill

Avatar

Hi Tim,

When I double-click in the OnClick event for a TMenuItem in the Object Inspector, it doesn't jump to the event in the code editor.  

In addition to that, if I keep double-clicking on the OnClick event it creates multiple declarations.

Example:

     Menu1: TMenu;
     MenuItem1: TMenuItem;
     procedure Menu1.MenuItem1Click(Sender: TObject);
     procedure Menu1.MenuItem1Click(Sender: TObject);
     procedure Menu1.MenuItem1Click(Sender: TObject);

implementation

procedure TfrmMain.Menu1.MenuItem1Click(Sender: TObject);
begin

end;

procedure TfrmMain.Menu1.MenuItem1Click(Sender: TObject);
begin

end;

procedure TfrmMain.Menu1.MenuItem1Click(Sender: TObject);
begin
  
end;


= Steve
Wed, Jun 17 2020 7:11 PMPermanent Link

Steve Gill

Avatar

There is also a problem with the OnClick declarations, for TMenu items.

     SideMenu: TMenu;
     mnuDashboard: TMenuItem;
     mnuAccounts: TMenuItem;
     Grid1: TGrid;
     BasicPanel2: TBasicPanel;
     Button1: TButton;
     Button2: TButton;
     Button3: TButton;
     procedure SideMenu.mnuDashboardClick(Sender: TObject);
     procedure SideMenu.mnuAccountsClick(Sender: TObject);
  private


Multiple errors occur:

[Error] Main.wbs (40,25): Expected ; but instead found .
[Error] Main.wbs (40,25): Expected identifier but instead found .
[Error] Main.wbs (40,26): Expected : but instead found mnuDashboardClick
[Error] Main.wbs (40,43): Expected ; but instead found (
[Error] Main.wbs (40,43): Expected identifier but instead found (
[Error] Main.wbs (40,44): Expected : but instead found Sender
[Error] Main.wbs (40,50): Expected ; but instead found :
[Error] Main.wbs (40,50): Expected identifier but instead found :
[Error] Main.wbs (40,52): Expected : but instead found TObject
[Error] Main.wbs (40,59): Expected ; but instead found )
[Error] Main.wbs (40,59): Expected identifier but instead found )
[Error] Main.wbs (40,60): Expected : but instead found ;
[Error] Main.wbs (40,60): Expected identifier but instead found ;
[Error] Main.wbs (41,7): Expected ; but instead found procedure
[Error] Main.wbs (41,25): Expected ; but instead found .
[Error] Main.wbs (41,17): Duplicate declaration SideMenu found
[Error] Main.wbs (41,17): Maximum number of compilation errors reached


= Steve
Thu, Jun 18 2020 8:27 PMPermanent Link

Steve Gill

Avatar

Steve Gill wrote:

<< There is also a problem with the OnClick declarations, for TMenu items.

     SideMenu: TMenu;
     mnuDashboard: TMenuItem;
     mnuAccounts: TMenuItem;
     Grid1: TGrid;
     BasicPanel2: TBasicPanel;
     Button1: TButton;
     Button2: TButton;
     Button3: TButton;
     procedure SideMenu.mnuDashboardClick(Sender: TObject);
     procedure SideMenu.mnuAccountsClick(Sender: TObject);
  private >>

I should point out that if "SideMenu." is removed from the automatic declaration the code then works fine.

= Steve
Thu, Jul 23 2020 4:46 PMPermanent Link

Tim Young [Elevate Software]

Elevate Software, Inc.

Avatar

Email timyoung@elevatesoft.com

Steve,

All of these issues are fixed in build 16.

Tim Young
Elevate Software
www.elevatesoft.com
Image