Bug 60821 - ArgumentNullException due to wrong binding in NSWorkspace.SharedWorkspace.OpenFile
Summary: ArgumentNullException due to wrong binding in NSWorkspace.SharedWorkspace.Ope...
Alias: None
Product: Xamarin.Mac
Classification: Desktop
Component: Library (Xamarin.Mac.dll) ()
Version: unspecified
Hardware: PC Mac OS
: --- normal
Target Milestone: master
Assignee: Alex Soto [MSFT]
Depends on:
Reported: 2017-11-23 07:56 UTC by Maxim Kosov
Modified: 2017-11-27 03:09 UTC (History)
3 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 Maxim Kosov 2017-11-23 07:56:18 UTC
If want to open file in default application and deactivate sending app.
Cocoa has following method for it:
NSWorkspace.SharedWorkspace.OpenFile("some/path/file.txt", null, true)

Unfortunately, when OpenFile called and second param is null I get ArgumentNullException. Null is valid value according to Cocoa documentation.
Comment 1 Alex Soto [MSFT] 2017-11-23 17:23:47 UTC
You are completely right, thanks a lot

PR: https://github.com/xamarin/xamarin-macios/pull/3036
Comment 2 Alex Soto [MSFT] 2017-11-27 03:09:46 UTC
Fixed in xamarin-macios/master @ https://github.com/xamarin/xamarin-macios/commit/2aa2c5988e7848eb997002196b20ee90c9922b8a