Re: How to Distinguish Between Two TableViews
Re: How to Distinguish Between Two TableViews
- Subject: Re: How to Distinguish Between Two TableViews
- From: Graham Cox <email@hidden>
- Date: Tue, 19 Oct 2010 09:32:12 +1100
On 19/10/2010, at 7:31 AM, Uli Kusterer wrote:
> This is a code smell, i.e. a sign that you're likely doing something in a way that it wasn't intended to be done.
>
> Don't try to distinguish between them, give them each a separate data source/delegate object. That way, you get only one table's messages, and it's obvious which one it came from.
This is not necessarily a code smell. If it were, why would the tableview object be passed as a parameter to the data source?
Sometimes the same data source for more than one table can be a sensible design.
Michael's answer is what I'd do.
--Graham
_______________________________________________
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