Bug 7253 - Duplicate Action Signal Handler code was generated by the IDE.
Summary: Duplicate Action Signal Handler code was generated by the IDE.
Status: NEW
Alias: None
Product: Xamarin Studio
Classification: Desktop
Component: GTK# Designer ()
Version: 3.0.x
Hardware: PC Windows
: --- normal
Target Milestone: ---
Assignee: Bugzilla
URL:
Depends on:
Blocks:
 
Reported: 2012-09-18 09:52 UTC by Henry Zhou
Modified: 2015-01-16 20:18 UTC (History)
3 users (show)

Tags:
Is this bug a regression?: ---
Last known good build:

Notice (2018-05-24): bugzilla.xamarin.com is now in read-only mode.

Please join us on Visual Studio Developer Community and in the Xamarin and Mono organizations on GitHub to continue tracking issues. Bugzilla will remain available for reference in read-only mode. We will continue to work on open Bugzilla bugs, copy them to the new locations as needed for follow-up, and add the new items under Related Links.

Our sincere thanks to everyone who has contributed on this bug tracker over the years. Thanks also for your understanding as we make these adjustments and improvements for the future.


Please create a new report for Bug 7253 on Developer Community or GitHub if you have new information to add and do not yet see a matching new report.

If the latest results still closely match this report, you can use the original description:

  • Export the original title and description: Developer Community HTML or GitHub Markdown
  • Copy the title and description into the new report. Adjust them to be up-to-date if needed.
  • Add your new information.

In special cases on GitHub you might also want the comments: GitHub Markdown with public comments

Related Links:
Status:
NEW

Description Henry Zhou 2012-09-18 09:52:10 UTC
Description of Problem:


Steps to reproduce the problem:
1. Place a menu control in a GTK2 window form.
2. Add some menu items.
3. Select and item and double click the "Activated" Action Signal in Signals Properties Window.
4. The IDE will generate the handler code automatically, but the code is duplicated.
5. Try again, you will find the place is wrong to insert new generated code.

Actual Results:

Please see the code:

using System;
using Gtk;

public partial class MainWindow: Gtk.Window
{	
	public MainWindow (): base (Gtk.WindowType.Toplevel)
	{
		Build ();
	}
	
	protected void OnDeleteEvent (object sender, DeleteEventArgs a)
	{
		Application.Quit ();
		a.RetVal = true;
	}

	protected void OnOpenActionActivated (object sender, EventArgs e)
	{
		throw new System.NotImplementedException ();
	}


	protected void OnOpenActionActivated (object sender, EventArgs e)
	{
		throw new System.NotImplementedException ();
	}
}


	protected void OnCloseActionActivated (object sender, EventArgs e)
	{
		throw new System.NotImplementedException ();
	}
	protected void OnCloseActionActivated (object sender, EventArgs e)
	{
		throw new System.NotImplementedException ();
	}




Expected Results:


How often does this happen? 

Every time.


Additional Information:
Comment 1 Henry Zhou 2012-09-19 03:33:24 UTC
This issue both happened in Mac and Windows platform IDE.
Comment 2 tad.carlucci 2014-07-04 11:34:30 UTC
Confirming also on Linux.

This is an annoying bug, I'm glad to see it was already reported, and disappointed to see no action on it after close to two years.
Comment 3 IdontLikeBugs 2015-01-16 20:18:32 UTC
This bug still exists in 5.7 Monodevelop, Linux version.