On Jan 24, 2013, at 17:37 , Graham Cox <[email protected]> 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 protected])

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 [email protected]

Reply via email to