NSOutlineView not expanding on macOS 13.6 despite valid data source implementation
I'm working with an scenario where my `NSOutlineView` is not expanding correctly when I click on the disclosure triangles, even though the data source and delegate methods appear to be set up properly. I'm using macOS 13.6 and Swift. The `NSOutlineView` is bound to a data source that implements the required methods, such as `outlineView(_:numberOfChildrenOfItem:)`, `outlineView(_:child:ofItem:)`, and `outlineView(_:isItemExpandable:)`. However, when I click on a row, nothing happens, and no errors are thrown in the console. Here's a basic structure of the data source I am using: ```swift class MyOutlineViewDataSource: NSObject, NSOutlineViewDataSource { var items: [MyItem] = [] func outlineView(_ outlineView: NSOutlineView, numberOfChildrenOfItem item: Any?) -> Int { if let item = item as? MyItem { return item.children.count } return items.count } func outlineView(_ outlineView: NSOutlineView, child index: Int, ofItem item: Any?) -> Any { if let item = item as? MyItem { return item.children[index] } return items[index] } func outlineView(_ outlineView: NSOutlineView, isItemExpandable item: Any) -> Bool { if let item = item as? MyItem { return !item.children.isEmpty } return false } } ``` The `NSOutlineView` is configured in Interface Builder and linked correctly. I'm also ensuring that the `delegate` and `dataSource` are set to an instance of `MyOutlineViewDataSource` in `viewDidLoad`: ```swift let dataSource = MyOutlineViewDataSource() outlineView.dataSource = dataSource outlineView.delegate = self ``` Despite following these steps, the outline view does not respond to clicks to expand items. I have tried calling `outlineView.reloadData()` after modifying the data source, but it hasn't helped. I am not seeing any debug output that indicates which methods are being called when I click on the disclosure triangles. I also confirmed that the `MyItem` class correctly conforms to any necessary protocols. My `NSOutlineView` is supposed to display a hierarchy of items, but I need to seem to get it to expand or collapse properly. Any suggestions on what might be going wrong here? Any help would be greatly appreciated! For context: I'm using Swift on Debian.