Bug 21587 - NSTableView.EditColumn improperly asserts null check on theEvent argument
Summary: NSTableView.EditColumn improperly asserts null check on theEvent argument
Alias: None
Product: MonoMac
Classification: Desktop
Component: Bindings ()
Version: unspecified
Hardware: PC Mac OS
: --- normal
Target Milestone: ---
Assignee: Bugzilla
Depends on:
Reported: 2014-07-24 23:44 UTC by xamarin
Modified: 2014-07-25 16:30 UTC (History)
2 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 xamarin 2014-07-24 23:44:30 UTC
The NSTableView.EditColumn binding asserts that theEvent argument must not be null. This is incorrect. When programmatically initiating a cell edit on NSTableView or its subclasses, use of nil for the argument is correct.

You can work around this as follows.
NOTE: This workaround assumes you wish to select the contents of the cell.
NOTE: This workaround assumes the NSTableView is a direct binding.

    internal static class NSTableViewHelpers
        static IntPtr selEditColumnRowWithEventSelect_Handle = MonoMac.ObjCRuntime.Selector.GetHandle("editColumn:row:withEvent:select:");
        internal static void EditColumn(this NSTableView table, int column, int row)
            MonoMac.ObjCRuntime.Messaging.void_objc_msgSend_int_int_IntPtr_bool (table.Handle, selEditColumnRowWithEventSelect_Handle, column, row, IntPtr.Zero, true);
Comment 1 Chris Hamons 2014-07-25 16:30:13 UTC
Fixed in master \ 0d7ff85c94b52294a7cede349cca7d2f36956d27