Re: NSTableView, bindings and datasource
Re: NSTableView, bindings and datasource
- Subject: Re: NSTableView, bindings and datasource
- From: Corbin Dunn <email@hidden>
- Date: Mon, 25 Aug 2008 08:38:53 -0700
On Aug 24, 2008, at 11:55 PM, Pierre Chatelier wrote:
Hello,
I was wondering something...
I have an NSTableView which is automatically filled by binding. So,
I did not set any dataSource.
But I want to implement
"tableView:writeRowsWithIndexes:toPasteboard:", which is a
dataSource method. So, I set some object to be the dataSource,
implementing the method.
At run-time, it complains that the dataSource should implement
numberOfRowsInTableView:. I had to implement such a method, but the
return value remains unused since the bindings are responsible for
feeding.
My question is : yes, it works, but what is logical to do ?
Yes -- it is; we are working on removing the warning if you use
bindings.
Should I also implement dummy
"tableview:objectValueForTableColumn:row:" and others methods that
are theoretically required for a datasource, but practically unused
when using bindings ?
Yes, just that one and -numberOfRowsInTableView.
--corbin
_______________________________________________
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