Bug 19635 - Actions and outlets aren't generated for Bar Button Items
Summary: Actions and outlets aren't generated for Bar Button Items
Status: VERIFIED DUPLICATE of bug 22466
Alias: None
Product: Visual Studio Extensions
Classification: Xamarin
Component: iOS Designer ()
Version: 3.0
Hardware: PC Windows
: Highest major
Target Milestone: 2.0
Assignee: Alex Corrado [MSFT]
URL:
: 19111 19652 ()
Depends on:
Blocks:
 
Reported: 2014-05-09 04:00 UTC by Mikael Nensén
Modified: 2014-09-15 05:14 UTC (History)
11 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 on Developer Community with your current version information, steps to reproduce, and relevant error messages or log files if you are hitting an issue that looks similar to this resolved bug and you do not yet see a matching new report.

Related Links:
Status:
VERIFIED DUPLICATE of bug 22466

Description Mikael Nensén 2014-05-09 04:00:49 UTC
Scenario:
iPad Storyboard project. Need a Next/Done/Continue button on the Navigation Item in the upper right of the screen.

What I do:
I drop the Bar Button Item on the Navigation Item. I give it a Title, Name and enter something under Events->Action.

Expected:
In the view's designer.cs file a property with two attributes gets generated (OutletAttribute and GeneratedCodeAttribute) and a partial method declaration with two attributes (ActionAttribute and GeneratedCodeAttribute).

Result:
Nothing gets generated.

Workaround:
Declare the outlet property and action method declaration in the view's .cs file.
Comment 1 Mikael Nensén 2014-05-09 04:02:50 UTC
Double-clicking the Bar Button Item should generate the action method declaration in the designer for Action.
Comment 2 Sunil Kumar 2014-05-09 06:52:51 UTC
We have tried to reproduce this issue. As per my observation when I double clicks on "Bar Button Item", it's not generating the action method declaration in the designer for Action.

Screencast: http://screencast.com/t/bjFo87xau

Environment info:
VS 
Xamarin for Visual Studio   2.0.92.0 (97c9f75ed0107fa2a684343b010b218a4db53793)
Xamarin.Android   4.12.4.10 (3e2a60637a8139091e095fec2046762fd3522d1b)
Xamarin.iOS   2.0.92.0 (97c9f75ed0107fa2a684343b010b218a4db53793)
Comment 3 Jérémie Laval 2014-05-09 14:13:00 UTC
You need to set a class name on the view controller before you can create actions. This is why the name part of the button item turns red.

We should have a warning message in that case that wasn't set correctly, rewording and reassigning bug.
Comment 4 Alex Corrado [MSFT] 2014-05-09 14:39:58 UTC
It looks like actions and outlets aren't generated even if there is a custom class for the view controller.
Comment 5 Alex Corrado [MSFT] 2014-05-09 15:05:32 UTC
*** Bug 19652 has been marked as a duplicate of this bug. ***
Comment 6 Alex Corrado [MSFT] 2014-05-14 18:54:27 UTC
This is fixed.

md-addins master:
cf74dddc39cbe26bc78e483910daadf62760f27c
d5eb9326a2fe11b3f60190f0686bd3ea82b24322
5d7d5b4c2c8b713672e75238a6fd97f87674dcaa
a12b80bfa5da9e7e49c6b480d0e015ad4ee3b6ff

monodevelop-5.0-branch (double-clicking the Bar Button Item is fixed in master but didn't make it here):
7195e0b30b6a9cb26d49b167314074b2d2ea6b8c
5aedbd9ac8f6693059453ca3bc0fca1ceafeee11
08860bdee2d95901859b912a76014dc5c38cd171
Comment 7 Nischal 2014-05-15 02:29:31 UTC
I have checked this issue with latest XS master build(XS 5.1 (build 111)),Now on double clicking bar button item action method generates in .cs file.Below is the screencast for the same:
http://screencast.com/t/Cr3q3QrD

Please let us know when this changes applied on VS 2.0 so that we can check and close this issue.
Comment 8 paulkelly1212 2014-05-15 10:00:32 UTC
Is there a way I can access this "HotFix" and test?

The other issues I had and wish to confirm was that you could not enter a Identity Name (would not let you even type it in the field) for a UIBarButtonItem when created in/on the BOTTOM TOOLBAR.

Also the UIBarButtonItem when in the UINav bar could not create a Segue.

Thank you
Comment 9 Alex Corrado [MSFT] 2014-05-16 19:09:24 UTC
*** Bug 19111 has been marked as a duplicate of this bug. ***
Comment 10 Alan McGovern 2014-05-19 18:24:25 UTC
Generally we do not release internal builds publicly as they have not undergone any QA. The fixes we've committed should be in the next alpha/beta though, so just keep an eye out for a newer build to appear.
Comment 11 paulkelly1212 2014-05-21 10:01:23 UTC
Just wondering about a release date on the Alpha channel of Xamarin Studio 5.1 as per Nischal comments above on 5/15/2014

Thanks again for a great IDE
Comment 12 paulkelly1212 2014-05-23 16:28:14 UTC
All, 
I am testing Xamarin Studio Version 5.0 (build 876)
Identity Name for UIBarButtonItem now appears to work

However, there is still a problem as UIBarButtomItems on top (Nav) or Bottom (Tool) Bars can NOT create a Seque by Control Drag to another screen.......or is there another way to do it as I have no problem creating Segue from a UIButton etc

I noted this in my comments above on2014-05-15 10:00:32 EDT
Comment 13 Sunil Kumar 2014-09-09 09:59:54 UTC
Today, we have checked this issue and still we are getting the same issue. Actions and outlets aren't generated for Bar Button Item in XS and VS both.

Screencast(XS on mac): http://www.screencast.com/t/8YoKELqsN
Screencast (VS): http://www.screencast.com/t/iAhDEweJ

Environment info:
=== Xamarin Studio ===

Version 5.4 (build 214)
Installation UUID: 561c7a69-0a91-4bae-ad7c-f0c79d594337
Runtime:
	Mono 3.8.0 ((no/45d0ba1)
	GTK+ 2.24.23 (Raleigh theme)

	Package version: 308000009

=== Xamarin.Android ===

Version: 4.17.0 (Trial Edition)
Android SDK: /Users/tajinder/Desktop/android-sdk-macosx
	Supported Android versions:
		2.1    (API level 7)
		2.2    (API level 8)
		2.3    (API level 10)
		3.1    (API level 12)
		3.2    (API level 13)
		4.0    (API level 14)
		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)
		4.5    (API level 21)
Java SDK: /usr
java version "1.7.0_67"
Java(TM) SE Runtime Environment (build 1.7.0_67-b01)
Java HotSpot(TM) 64-Bit Server VM (build 24.65-b04, mixed mode)

=== Apple Developer Tools ===

Xcode 5.1.1 (5085)
Build 5B1008

=== Xamarin.iOS ===

Version: 7.9.5.20 (Business Edition)
Hash: 954ed76
Branch: 
Build date: 2014-09-08 17:48:07-0400

=== Xamarin.Mac ===

Version: 1.10.0.10 (Business Edition)

=== Build Information ===

Release ID: 504000214
Git revision: f702dcee9f4a942a68c70228bbf7f8e6b4871e24
Build date: 2014-09-08 21:11:53-04
Xamarin addins: ada8d3019cadb3d895f88c56ab92d551d9f8a7c9

=== Operating System ===

Mac OS X 10.8.4
Darwin Tajinders-iMac.local 12.4.2 Darwin Kernel Version 12.4.2
    Mon Jun 17 18:00:12 PDT 2013
    root:xnu-2050.45.8~1/RELEASE_X86_64 x86_64


Windows Environment:
VS 2013
XVS 3.6.192
Comment 14 Alex Corrado [MSFT] 2014-09-10 18:29:54 UTC
If you are testing with a "Unified API" project, then the issue you're seeing is actually a duplicate of bug 22466 and this bug can be closed again.
Comment 15 Sunil Kumar 2014-09-11 08:50:17 UTC
It is working fine with "Classic API" projects.

Hence closing this issue.
Comment 16 Alan McGovern 2014-09-15 05:14:43 UTC

*** This bug has been marked as a duplicate of bug 22466 ***