Bug 45243 - AppKit: NSObject.Bind is incorrect
Summary: AppKit: NSObject.Bind is incorrect
Alias: None
Product: Xamarin.Mac
Classification: Desktop
Component: Library (Xamarin.Mac.dll) ()
Version: Master
Hardware: PC Mac OS
: Normal normal
Target Milestone: (C10)
Assignee: Timothy Risi
Depends on:
Reported: 2016-10-10 17:55 UTC by Aaron Bockover [MSFT]
Modified: 2017-01-03 16:53 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 Aaron Bockover [MSFT] 2016-10-10 17:55:26 UTC
Bind should not take a c# string for the binding argument (only for the keyPath argument). Due to this incorrect XM binding, many AppKit property bindings do not work (e.g. NSSelectedIndexBinding).

Workaround extension method: https://gist.github.com/abock/c14226892f2f808a14c4265dfc07bbe9
Comment 1 Chris Hamons 2016-10-10 18:04:52 UTC
This has been broken since 2010.

We need to add a 2nd version that takes NSString, [Obsolete] the existing one, and have it removed completely in XAMCORE_4_0.

When doing this, please search for "string binding". They are all very likely wrong and should be NSString binding.

Aaron Bockover - BindingValueClass, Unbind, Bind, BindingInfo, BindingOptionDescriptions
Comment 2 Chris Hamons 2016-10-10 18:05:56 UTC
and while you're at it, `ExposedBindings` should be a property in XAMCORE_4_0
Comment 3 Chris Hamons 2016-10-10 18:06:12 UTC
This doesn't _have_ to be in C9 but it'd be nice.
Comment 4 Chris Hamons 2016-10-10 18:06:25 UTC
 and all of the getter methods should be named as such

`BindingInfo` → `GetBindingInfo`, etc
Comment 5 Timothy Risi 2016-11-15 00:06:22 UTC