Bug 35356 - Samples using NSOutlineView are broken in C6
Summary: Samples using NSOutlineView are broken in C6
Status: VERIFIED FIXED
Alias: None
Product: Xamarin.Mac
Classification: Desktop
Component: Library (Xamarin.Mac.dll) ()
Version: 2.4.0 (C6)
Hardware: PC Mac OS
: High blocker
Target Milestone: 2.4.0 (C6)
Assignee: Chris Hamons
URL:
Depends on:
Blocks:
 
Reported: 2015-10-29 10:16 UTC by Chris Hamons
Modified: 2015-11-04 11:03 UTC (History)
3 users (show)

Tags:
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:
Status:
VERIFIED FIXED

Description Chris Hamons 2015-10-29 10:16:42 UTC
If you load this sample in C6:

https://developer.xamarin.com/samples/mac/MacOutlines/

you don't get all of the UI. Something is broken it appears. Regression from C5.

[10:14 AM] Kevin Munster ☠: I did just find something… so the first load isn’t displaying subview loaded from sub `.xibs` however the second time it is issued, the view is displaying. On the outline views no text is being displayed but the “items” are there. It’s like the text and icons are transparent. Still looking for the simplest sample.
Comment 1 Chris Hamons 2015-10-29 10:22:58 UTC
 Chris, so the simplest one that is broken is MacImages and it is limited to the Outline view, something has changed there and since pretty much all the samples are built off of the outline, almost all are broken. In one of my samples I did get this message in the output after I ended the app:

```MacOutlines[30774:8373095] *** NSOutlineView data source (<MacOutlines_ProductOutlineDataSource: 0x10e016fe0>) does not implement outlineView:persistentObjectForItem:
Comment 2 Chris Hamons 2015-10-29 11:03:08 UTC
It appears to be an issue with members of the outline view delegate not being called.

Possibly related to e00c49c0b7679b9aaa62584674d99d3ac2094b4b.

Debugging in process.
Comment 3 Chris Hamons 2015-10-29 11:24:29 UTC
So in that hash for all the methods removed, except one, if you override in a sample and check base symbol, you will see the export tag. That is except this one:

-               [Lion, Export ("outlineView:viewForTableColumn:item:")]
-               NSView ViewForTableColumn (NSOutlineView outlineView, NSTableColumn tableColumn, NSObject item);

The problem appears to be that we had a different binding for that one as well:

              [Export ("outlineView:viewForTableColumn:item:"), NoDefaultValue]
                NSView GetView (NSOutlineView outlineView, NSTableColumn tableColumn, NSObject item);

and the patch obsoleted one and kept the other. However, that breaks every single person who was calling the other one. This is unacceptable. Our choices are:

- somehow fix this
- Remove ViewForTableColumn completely and make it a breaking change.

What we have right now is worse than both of those options.
Comment 4 Chris Hamons 2015-10-29 12:22:23 UTC
Fixed in master / 9a385a67a378e04cee85cd620a70511d95076907
Comment 5 Rajneesh Kumar 2015-10-30 10:30:57 UTC
@Chris
I have checked Xamarin Mac "MacOutlines" samples with Master build
xamarin.mac-2.5.0.2010_b1d75eccfc5c63818c5e6d4d069d5b17b7c97870
and I am not able to run the sample application due to the runtime exception. I have filed the following bug for the same: https://bugzilla.xamarin.com/show_bug.cgi?id=35398

I am unable to verify this issue due to above issue. I will verify this issue when bug 35398 will get resolved.

Thanks..!
Comment 6 Chris Hamons 2015-10-30 17:09:06 UTC
Bah. As this commit shows:

commit 4fff415c42da39b17e86bcf32d2379103d493e57
Author: Chris Hamons <chris.hamons@xamarin.com>
Date:   Fri Oct 30 16:59:19 2015 -0400

    Remove ViewForTableColumn since Obsolete (string, bool) does not do what you think
    
    - Fun fact, if you obsolete a virtual method that is never called in your code (say binding) it is a warning, NOT an error.
    - So, what can we do but nuking it? If you override "wrong" one, your app just stops working.

My first fix was wrong. So let's nuke it for orbit :(
Comment 7 Rajneesh Kumar 2015-11-03 09:02:44 UTC
Sample Info: mac-samples1e20a0d29145ec19c031fa611c7225e1998f6d89

I have checked this issue with the Cycle 6 build 
xamarin.mac-2.4.0.108_63c58d9d2e557031edb410f22057b2ca8445a6f8 and observed that this issue does not exist with this build. Now I am able to build and run the application
successfully, and getting the expected behavior as mentioned in the bug description i.e. I am t getting all of the UI.

Screencast: http://www.screencast.com/t/XUjNT3J07Hhj

This fix has been merged in release branch and working fine, hence I am closing this issue.

Thanks..!