CollectionView Broken in XS 6.1.2 (build 44)

AllanChin.6924AllanChin.6924 Allan ChinUSUniversity ✭✭✭

Following the Xamarin Mac guide on how to implement a CollectionView, I'm no longer able to get the Prototype View to show up when I drag a CollectionView control onto the NSView's .xib file. This use to happen in previous versions of XS intermittently and I was always able to eventually get one to show up by continuously deleting and re-added the CollectionView control until it finally did. Now it never shows up.

I've attached a barebones Xamarin.Mac app project. In it I opened up the MyCollectionView.xib file and dragged a CollectionView control onto the View. But the Prototype view never shows up.

Here's my system info.

=== Xamarin Studio Community ===

Version 6.1.2 (build 44)
Installation UUID: 036dad07-9860-4965-94a9-aa8abd5b8698
Runtime:
Mono 4.8.0 (mono-4.8.0-branch/df81fe4) (64-bit)
GTK+ 2.24.23 (Raleigh theme)

Package version: 408000395

=== NuGet ===

Version: 3.4.3.0

=== Xamarin.Profiler ===

Not Installed

=== Xamarin.Android ===

Version: 7.0.2.37 (Xamarin Studio Community)
Android SDK: /Users/hpadmin/Library/Developer/Xamarin/android-sdk-macosx
Supported Android versions:
6.0 (API level 23)

SDK Tools Version: 25.1.2
SDK Platform Tools Version: 24.0.0
SDK Build Tools Version: 23.0.2

Java SDK: /usr
java version "1.8.0_101"
Java(TM) SE Runtime Environment (build 1.8.0_101-b13)
Java HotSpot(TM) 64-Bit Server VM (build 25.101-b13, mixed mode)

Android Designer EPL code available here:
https://github.com/xamarin/AndroidDesigner.EPL

=== Xamarin Android Player ===

Not Installed

=== Apple Developer Tools ===

Xcode 8.2.1 (11766.1)
Build 8C1002

=== Xamarin.Mac ===

Version: 2.10.0.113 (Xamarin Studio Community)

=== Xamarin.iOS ===

Version: 10.3.0.0 (Xamarin Studio Community)
Hash: e02d272
Branch: xcode8.2
Build date: 2016-12-12 23:00:41-0500

=== Xamarin Inspector ===

Version: 1.0.0.0
Hash: 1f3067d
Branch: master
Build date: 11/15/2016 1:13:59 PM

=== Build Information ===

Release ID: 601020044
Git revision: 0ccfcd52b95305ebd5b7eca0d88c1017035910ae
Build date: 2016-10-28 15:12:43-04
Xamarin addins: a39a869d8a78d87bdc6775f696c13a4cc9024501
Build lane: monodevelop-lion-cycle8

=== Operating System ===

Mac OS X 10.12.2
Darwin hpadmins-Mini.sdg.rd.hpicorp.net 16.3.0 Darwin Kernel Version 16.3.0
Thu Nov 17 20:23:58 PST 2016
root:xnu-3789.31.2~1/RELEASE_X86_64 x86_64

=== Enabled user installed addins ===

Xamarin Inspector 1.0.0.0

Posts

  • AllanChin.6924AllanChin.6924 Allan Chin USUniversity ✭✭✭

    Any help out there on this one? I'm kind of dead in the water without this control.

    Thanks

  • ChrisHamonsChrisHamons Chris Hamons USXamarin Team Xamurai

    If I understand this issue, I do not believe this is a XS bug at all. It sounds like different behavior inside Xcode, which XS has nothing to do (beyond launching it and reading the project when you close it to generate outlets and the like.

    A quick google search turns up a number of people complaining about what sounds like similar issues:

    http://stackoverflow.com/questions/26542955/cocoa-where-is-the-link-between-a-nscollectionview-and-a-nscollectionviewitem
    http://stackoverflow.com/questions/30785735/how-to-fix-this-prototype-segue-related-with-my-nscollectionview-xcode-7-0-be

  • AllanChin.6924AllanChin.6924 Allan Chin USUniversity ✭✭✭

    Thanks Chris. But this is not related to an NSCollectionViewItem. And I'm not a strict XCode user, just Xamarin.Mac. via Xamarin Studio. But if you just try to follow the steps in the Xamarin Guide, https://developer.xamarin.com/guides/mac/user-interface/working-with-collection-views/, I can get past this particular step, https://developer.xamarin.com/guides/mac/user-interface/working-with-collection-views/#Creating_the_Collection_View_in_Interface_Builder.

    As I said before, this use to work, albeit an a somewhat flaky fashion, but now it doesn't seem to work at all. I understand this may be an XCode issue, but I'm working with Xamarin Studio which somehow integrates with XCode.

    Has someone at Xamarin even verified this problem exists? And if so, since I'm following a Xamarin guide and using a Xamarin tool, shouldn't Xamarin assure what it advertises works?

  • ChrisHamonsChrisHamons Chris Hamons USXamarin Team Xamurai
    edited January 11

    I understand this may be an XCode issue, but I'm working with Xamarin Studio which somehow integrates with XCode.

    I'm telling your our integration is related to creating xcode projects, launching, and reading the results after Xcode deals with them. I do not believe XS has anything at all to do with this (since the stack overflow posts are not using Xamarin.Mac at all).

    I'll have someone walk through the guide to see if we can reproduce, but the guide is literally telling you how to use Xcode. If there is an Xcode bug, then that's Apple bug, not ours.

  • AllanChin.6924AllanChin.6924 Allan Chin USUniversity ✭✭✭

    Understood Chris. But if this really does turn out to be an Apple bug, who should be chasing Apple about it, in this context?

    But let's see if you guys can at least verify the problem, first.

    Thanks

  • ChrisHamonsChrisHamons Chris Hamons USXamarin Team Xamurai

    Ok, I did a bit of poking this morning (by reading the Apple documentation) and came up with:

    https://developer.apple.com/reference/appkit/nscollectionview/1528285-itemprototype?language=objc

    It appears the reason that Apple isn't creating the prototype in IB (Interface Builder) is because that way of handling them is considered "Legacy".

    It appears they want you to use https://developer.apple.com/reference/appkit/nscollectionview/1528222-datasource?language=objc and implement https://developer.apple.com/reference/appkit/nscollectionviewdatasource?language=objc

    So Apple won't consider this a bug, they want you to use the new API and are "forcing" you by changing how IB works.

    I'll open a documentation issue internally to note we should update the docs and sample.

  • ChrisHamonsChrisHamons Chris Hamons USXamarin Team Xamurai

    The unpleasant bit is that the new API is 10.11+ only, so if you need to support earlier you get neither easy IB support nor the new hotness.

    In that case, I would follow the Stack Overflow posts I posted earlier and set the prototype in your code.

  • AllanChin.6924AllanChin.6924 Allan Chin USUniversity ✭✭✭

    Ahh.. so it appears Apple if forcing us to implement NSCollectionViews like NSTableViews using 10.11+. It might not be so bad if it were clear on how to do it. I'm anxious to see how to implement such a beast from within Xamarin Studio/XCode via docs, guide, and sample.

    Thanks for following up on this matter, Chris.

    Is it possible for me to get notified when the documentation becomes available?

  • ChrisHamonsChrisHamons Chris Hamons USXamarin Team Xamurai

    It may take a significant amount of time for our documentation / samples to be updated. I would not wait on them, specially when there is already existing documentation out from Apple.

    Being able to read and process Apple's platform documentation is a very important skill for successful development on Cocoa.

  • AllanChin.6924AllanChin.6924 Allan Chin USUniversity ✭✭✭

    Also understood, but given that Apple's API documentation is so terse, Apple guides non-existent, and the NSCollectionView is by far the most complicated control to implement so far, I don't really have the time to decipher, extrapolate, translate, and convert Apple's docs on this particular control to Xamarin.Mac. Especially, since currently I'm the only Xamarin.Mac dev guy here trying to build a pretty major UI-intensive application. Also, the fact that XS and XCode get updated so frequently I never know whether any issue I run into is due to me, or the tools. That's why I keep pinging this forum:).

    So up-to-date Xamarin guides and docs definitely saves me a lot of time and frustration.

    I hope you understand where I'm coming from, Chris.

    Thanks

Sign In or Register to comment.