• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: How to Distinguish Between Two TableViews
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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

References: 
 >How to Distinguish Between Two TableViews (From: Chris Share <email@hidden>)
 >Re: How to Distinguish Between Two TableViews (From: Uli Kusterer <email@hidden>)
 >Re: How to Distinguish Between Two TableViews (From: Graham Cox <email@hidden>)

  • Prev by Date: Re: Problem using dictionary
  • Next by Date: [SOLVED] Re: [Distant Objects] Problem passing custom objects bycopy
  • Previous by thread: Re: How to Distinguish Between Two TableViews
  • Next by thread: Updating Core Data model object with an NSButtonCell
  • Index(es):
    • Date
    • Thread