Bug 16633 - UIApplication.SendAction should allow null target
Summary: UIApplication.SendAction should allow null target
Alias: None
Product: iOS
Classification: Xamarin
Component: Xamarin.iOS.dll ()
Version: 7.0.4.x
Hardware: PC Mac OS
: --- normal
Target Milestone: 7.0.6
Assignee: Bugzilla
Depends on:
Reported: 2013-12-05 19:41 UTC by Adam Kemp
Modified: 2014-01-15 11:43 UTC (History)
5 users (show)

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 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.

Related Links:

Description Adam Kemp 2013-12-05 19:41:56 UTC
The documentation for sendAction:to:from:forEvent: on UIApplication says that you can use a null target in order to send an action to the first responder. The Xamarin bindings throw a NullArgumentException if you try to do this.

For example, in ObjectiveC you can write code like this:

    [[UIApplication sharedApplication] sendAction:@selector(someSelector) to:nil from:nil forEvent:nil];

In Xamarin.iOS this code would throw:

    UIApplication.SharedApplication.SendAction(Selector.GetHandle("someSelector"), null, null, null);
Comment 1 Rolf Bjarne Kvinge [MSFT] 2013-12-06 05:43:38 UTC

monotouch/master: bec8ffdbc3bca0830cfb7e13f932ff3a8221dae4
Comment 2 PJ 2013-12-11 18:46:01 UTC
This fix is planned to be released with Xamarin.iOS 7.0.6, which should hit the beta channel before December 23rd.
Comment 3 narayanp 2014-01-15 04:14:12 UTC
Could you please provide me Test Project or some steps so that I can verify this issue?
Comment 4 Rolf Bjarne Kvinge [MSFT] 2014-01-15 04:37:03 UTC
Unit tests were added, no need for more tests.