Re: NSTableView: bindings with drag and drop
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