• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Swift NSOutlineView "Illegal NSOutlineView data source"
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


  • Follow-Ups:
    • Re: Swift NSOutlineView "Illegal NSOutlineView data source"
      • From: Quincey Morris <email@hidden>
    • Re: Swift NSOutlineView "Illegal NSOutlineView data source"
      • From: "Raglan T. Tiger" <email@hidden>
  • Prev by Date: Re: Init String with bytes
  • Next by Date: Re: Swift NSOutlineView "Illegal NSOutlineView data source"
  • Previous by thread: Reusable Detail View Controller for UISplitViewController?
  • Next by thread: Re: Swift NSOutlineView "Illegal NSOutlineView data source"
  • Index(es):
    • Date
    • Thread