Swift NSOutlineView "Illegal NSOutlineView data source"
Swift NSOutlineView "Illegal NSOutlineView data source"
- Subject: Swift NSOutlineView "Illegal NSOutlineView data source"
- From: Rick Mann <email@hidden>
- Date: Fri, 31 Jul 2015 15:17:05 -0700
Googling for this suggests the problem is old, and not confined to Xcode 7b4, but the proposed solutions (deleting and re-typing the methods) doesn't work for me. Has anyone found a better solution?
I have a simple NSOutlineView in source list mode, using an NSOutlineViewDataSource, in Swift 2. I've implemented …numberOfChildrenOfItem:, …child:ofItem:, …isItemExpandable:, and …viewForTableColumn:item:. I've even tried adding …objectValueForTableColumn:byItem:, which docs say is not necessary for view-based views.
But I still get this at run time:
*** Illegal NSOutlineView data source (<NSViewController: 0x6080000c6740>). Must implement outlineView:numberOfChildrenOfItem:, outlineView:isItemExpandable:, outlineView:child:ofItem: and outlineView:objectValueForTableColumn:byItem:
I'm not sure why those methods are optional if they must be implemented, but whatever.
Any suggestions on how to get it to behave? Thanks!
--
Rick Mann
email@hidden
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden