I am having a problem where it seems I am able to add items to a collection view, and have the prototype cells I created from a subclass of NSCollectionViewItem, but when I try to change the labels in order to display the data from the is get errors because they are nil, even though I connected them from the interface builder.
I also checked out the representedObject property by printing by attacked a mouseup function to the cell, and it was working fine. It only falls apart when I attempt to assign to the stringValue of the apparently nonexistent outlets.
Down below you can see my storyboard and the controller for the item views.
The Label objects are represented down below as the two @IBOutlets
.
representedObject
is being aliased as var morpheme : Morpheme?
Here in the main window controller I am testing out just adding the Morpheme
objects to the collection with test values that I'm wanting to populate the Labels with.
The display shows the cells in a list, but when I click them it crashes due to a nil
value from the apparently uninstantiated outlets. If you look in the console Morpheme 3
was printed successfully, so the data model made it in. Is there anything more I need to do? There is a lot of stuff about using the binding menu floating around, but I haven't played around much with it.