Re: Swift NSOutlineView Illegal NSOutlineView data source
sounds like the delegate isn't set so it don't know where to look for those or the delegate is set to the wrong object -rags On Jul 31, 2015, at 4:17 PM, Rick Mann rm...@latencyzero.com wrote: But I still get this at run time: *** Illegal NSOutlineView data source (NSViewController: 0x608c6740). Must implement outlineView:numberOfChildrenOfItem:, outlineView:isItemExpandable:, outlineView:child:ofItem: and outlineView:objectValueForTableColumn:byItem: ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) 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: https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: Swift NSOutlineView Illegal NSOutlineView data source
Yeah, it really does sound like that, doesn't it? You know what? I forgot to set the class name in the view controller in the storyboard. I'm an idiot. Thanks! On Jul 31, 2015, at 15:24 , Raglan T. Tiger r...@crusaderrabbit.net wrote: sounds like the delegate isn't set so it don't know where to look for those or the delegate is set to the wrong object -rags On Jul 31, 2015, at 4:17 PM, Rick Mann rm...@latencyzero.com wrote: But I still get this at run time: *** Illegal NSOutlineView data source (NSViewController: 0x608c6740). Must implement outlineView:numberOfChildrenOfItem:, outlineView:isItemExpandable:, outlineView:child:ofItem: and outlineView:objectValueForTableColumn:byItem: -- Rick Mann rm...@latencyzero.com ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) 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: https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: Swift NSOutlineView Illegal NSOutlineView data source
On Jul 31, 2015, at 15:17 , Rick Mann rm...@latencyzero.com wrote: I'm not sure why those methods are optional if they must be implemented, but whatever. Incidentally, they’re optional because a bindings-based table doesn’t use them, but still might have a data source because the methods that support drag-and-drop are data source methods, not delegate methods. ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) 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: https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Swift NSOutlineView Illegal NSOutlineView data source
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: 0x608c6740). 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 rm...@latencyzero.com ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) 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: https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: Swift NSOutlineView Illegal NSOutlineView data source
On Jul 31, 2015, at 15:33 , Quincey Morris quinceymor...@rivergatesoftware.com wrote: Incidentally, they’re optional because a bindings-based table doesn’t use them, but still might have a data source because the methods that support drag-and-drop are data source methods, not delegate methods. Yeah, I realized that. I usually use bindings for these things. I think the real solution is more Protocols, but it's fine. -- Rick Mann rm...@latencyzero.com ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) 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: https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com