• 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
Re: NSTableView: bindings with drag and drop
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: NSTableView: bindings with drag and drop


  • Subject: Re: NSTableView: bindings with drag and drop
  • From: Quincey Morris <email@hidden>
  • Date: Thu, 24 Jan 2013 17:48:27 -0800

On Jan 24, 2013, at 17:37 , Graham Cox <email@hidden> wrote:

> If the table view has a dataSource assigned, it has to be "legal", which means it must implement those two methods. The fact that, with bindings, they may not ever be called is irrelevant. The dataSource must conform to the compulsory protocol. I wouldn't call it a bug, just a very strict interpretation of the docs.

This is sensible, well-reasonable, believable and … not true. :)

This is from the table view programming guide:

> "While the NSTableViewDelegate Protocol protocol declares the data providing methods as @optional, all datasources that programmatically populate cell-based table views must implement those methods. The methods that that provide the number of rows and the content for each item within the table are marked as @optional because they are optional when using Cocoa bindings."

and the NSTableViewDelegate protocol reference says essentially the same thing.

My guess is that Chuck didn't declare his data source class as conforming to NSTableViewDelegate, and that in that case the table view implementation falls back to looking for informal conformance.

_______________________________________________

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: NSTableView: bindings with drag and drop
      • From: Chuck Soper <email@hidden>
    • Re: NSTableView: bindings with drag and drop
      • From: Quincey Morris <email@hidden>
References: 
 >NSTableView: bindings with drag and drop (From: Chuck Soper <email@hidden>)
 >Re: NSTableView: bindings with drag and drop (From: Graham Cox <email@hidden>)

  • Prev by Date: Re: Coordinate conversions in CALayer
  • Next by Date: Re: NSTableView: bindings with drag and drop
  • Previous by thread: Re: NSTableView: bindings with drag and drop
  • Next by thread: Re: NSTableView: bindings with drag and drop
  • Index(es):
    • Date
    • Thread