Bug 28298 - Actions Signals creating double functions/handlers
Summary: Actions Signals creating double functions/handlers
Status: CONFIRMED
Alias: None
Product: Xamarin Studio
Classification: Desktop
Component: GTK# Designer ()
Version: 5.8
Hardware: Macintosh Mac OS
: Normal normal
Target Milestone: master
Assignee: Bugzilla
URL:
Depends on:
Blocks:
 
Reported: 2015-03-21 21:44 UTC by fudzspam
Modified: 2015-11-30 18:04 UTC (History)
2 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 28298 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:
CONFIRMED

Description fudzspam 2015-03-21 21:44:20 UTC
Following this tutorial... 

http://www.monodevelop.com/documentation/stetic-gui-designer/ 

...and I'm at the section about creating action handlers for the menu items. When I type OnOpen, OnClose etc then view the source code, I get two functions for each of the handlers, when one each should be generated, surely.

Like this:

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 OnOpen (object sender, EventArgs e)
	{
		throw new NotImplementedException ();
	}

	protected void OnOpen (object sender, EventArgs e)
	{
		throw new NotImplementedException ();
	}

	protected void OnClose (object sender, EventArgs e)
	{
		throw new NotImplementedException ();
	}


	protected void OnClose (object sender, EventArgs e)
	{
		throw new NotImplementedException ();
	}

	protected void OnQuit (object sender, EventArgs e)
	{
		throw new NotImplementedException ();
	}


	protected void OnQuit (object sender, EventArgs e)
	{
		throw new NotImplementedException ();
	}
}
Comment 1 Abhishek 2015-11-30 17:57:21 UTC
I have tried this issue and able to reproduce the reported behavior at my end.

I have followed the tutorial link to create the application on GTK#.

Screencast: http://www.screencast.com/t/GNdVw4bp
IDE log: https://gist.github.com/Abhishekk360/5956d5a7f6a0f4c6b5b3

Environment Info:

=== Xamarin Studio ===

Version 5.10 (build 886)
Installation UUID: 93e693b0-b53d-40f4-b29c-b61ff5cbe892
Runtime:
	Mono 4.2.1 (explicit/6dd2d0d)
	GTK+ 2.24.23 (Raleigh theme)

	Package version: 402010102

=== Xamarin.Profiler ===

Version: 0.23.0.0
Location: /Applications/Xamarin Profiler.app/Contents/MacOS/Xamarin Profiler

=== Apple Developer Tools ===

Xcode 7.1 (9079)
Build 7B91b

=== Xamarin.iOS ===

Version: 9.2.1.51 (Enterprise Edition)
Hash: 3c0ec35
Branch: master
Build date: 2015-11-12 13:05:39-0500

=== Xamarin.Android ===

Version: 6.0.0.34 (Enterprise Edition)
Android SDK: /Users/xamarin23/Desktop/android-sdk-macosx
	Supported Android versions:
		2.3    (API level 10)
		4.0.3  (API level 15)
		4.1    (API level 16)
		4.2    (API level 17)
		4.3    (API level 18)
		4.4    (API level 19)
		4.4.87 (API level 20)
		5.0    (API level 21)
		5.1    (API level 22)
		6.0    (API level 23)

SDK Tools Version: 24.4.1
SDK Platform Tools Version: 23.0.1
SDK Build Tools Version: 23.0.2

Java SDK: /usr
java version "1.7.0_71"
Java(TM) SE Runtime Environment (build 1.7.0_71-b14)
Java HotSpot(TM) 64-Bit Server VM (build 24.71-b01, mixed mode)

=== Xamarin Android Player ===

Version: 0.6.1
Location: /Applications/Xamarin Android Player.app

=== Xamarin.Mac ===

Not Installed

=== Build Information ===

Release ID: 510000886
Git revision: 30a606e5b053549979a722e6bf05ce10c2c729bb
Build date: 2015-11-23 10:57:25-05
Xamarin addins: 80b23b59aeb3bdb68ff7c492430bb18cf72c5efd
Build lane: monodevelop-lion-cycle6

=== Operating System ===

Mac OS X 10.10.5
Darwin 800BC.local 14.5.0 Darwin Kernel Version 14.5.0
    Wed Jul 29 02:26:53 PDT 2015
    root:xnu-2782.40.9~1/RELEASE_X86_64 x86_64