If you click on an item in the collection, then click again, do you get it selected?
Does the problem occur when you first load the view or anytime ?
Have you set
collectionview.isSelectable = true
Try also to allow for multiple selection to see what happens.
May read this for some other hints:
Thanks for the response.
Yeah, I had them all set, and I did come across the question before this. The delegate methods are not called at all before I click somewhere within the collection view. So I can say that it wasn't really a problem with the delegate. I did verify that after I click somewhere inside the collection view's boundary it will start working just like normal.
Oh yeah, by the way, the NSCollectionView is in a prototype NSTableCellView if that's relevant, and the delegate is implemented within the table cell view's subclass.
Found the problem. The problem did indeed is in the table view.
This SO question that I've asked has the answer:
Just subclass the NSTableView and override validateProposedFirstResponder(_:for:) for the collection view.