Re: How to Distinguish Between Two TableViews
Re: How to Distinguish Between Two TableViews
- Subject: Re: How to Distinguish Between Two TableViews
- From: Uli Kusterer <email@hidden>
- Date: Tue, 19 Oct 2010 09:30:10 +0200
On 19.10.2010, at 00:32, Graham Cox wrote:
> This is not necessarily a code smell. If it were, why would the tableview object be passed as a parameter to the data source?
It is a *smell*. I never said it was wrong. A smell is an indicator that something is likely wrong, not a sure-fire way to always say: Don't do that.
However, considering the OP prefixed the posting with a beginner, and this is a problem to which the solution would be pretty obvious to someone who has read and *understood* the documentation, I thought I'd point out that the *common* solution is to have a separate object, not to have a giant switch statement like in procedural C.
> Sometimes the same data source for more than one table can be a sensible design.
Yeah, but think of what the more *common* case would be?
Cheers,
-- Uli Kusterer
"The Witnesses of TeachText are everywhere..."
http://groups.yahoo.com/group/mac-gui-dev/
_______________________________________________
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