Notice (2018-05-24): bugzilla.xamarin.com is now in
Please join us on
Visual Studio Developer Community and in the
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
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 or GitHub 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.
From case 57836:
The documentation seems to suggest that my problem is the fact that I have not created an Event correctly, but as far as I can tell, I have. I wanted to test the new interface (version 4.3.1 build 3). I have Xcode Version 5.0.2 (5A3005).
I created a NEW project (iOS, iPad with Storyboard, Tabbed)
Compiled and ran in debug. Everything fine as expected.
Added 1 button on the first tab page
Clicked on the Event tab and Created a single touch down event called: “BDown”
FirstView Designer automatically contained the following code:
[GeneratedCodeAttribute ("iOS Designer", "1.0")]
partial void BDown (UIButton sender);
In FirstView Controller, I added: (Note: Intellisence saw and allowed me to create this method)
partial void BDown (UIButton sender)
int a = 0;
and placed a break point on the line a=0;
Ran the app again in DEBUG mode.
at UIApplication.Main (args, null, "AppDelegate”);
the application crashed with the following error message:
Objective-C exception thrown. Name: NSInvalidArgumentException Reason: -[FirstViewController BDown:]: unrecognized selector sent to instance 0xe464fd0
As far as I can see, BDown was defined correctly and used correctly, yet it is not recognized. I changed to this version of Monotouch as I was finding the earlier release version was removing Xcode definitions.
Any advice would be deeply appreciated.
Adding the event name to the Action attribute in the designer.cs file fixes this issue.
Checked with a UISegmentedControl. Same thing. Naked Action attribute.
I have checked this issue on below environments:
Version 4.2.4 (build 13)
Version: 220.127.116.11 (Business Edition)
Git revision: 575c3e95ccd43e4c066755bda27b698fdfd59e3c
Xamarin addins: 79a1e35d2f486ba15541d74724e764c81878ab16
I have followed below steps to verify this issue:
1. Created iOS project.
2. Open storyboard file on Xcode and added a button with a single touch down event called BDown11.
3. In designer file automatic added below code:
partial void BDown11 (MonoTouch.UIKit.UIButton sender);
4 . I removed ("BDown11:") from [Action ("BDown11:")]
5. added below code: in View Controller file.
partial void BDown11 (UIButton sender)
int a = 0;
6. Added break point at line and "int a = 0;" debug application and noticed that exception is generated and break point not hit.
Exception log: https://gist.github.com/Sadik1/9507579
Screen cast: http://screencast.com/t/MmUpevl2hS
Also I noticed that without removing ("BDown11:") from [Action ("BDown11:")] it is working fine.
As per above observation I am reopening this issue.
It is correct that an error is thrown when you remove '("BDown11:")' from the action. The bug *fix* was to ensure that the value was always inserted.
Closing this issue as fixed as you did verify that the '("BDown11:")' is inserted as expected.