• 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: 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

  • Follow-Ups:
    • Re: How to Distinguish Between Two TableViews
      • From: Uli Kusterer <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>)

  • Prev by Date: Unarchiving cells out of order.
  • Next by Date: Re: Updating Core Data model object with an NSButtonCell
  • Previous by thread: Re: How to Distinguish Between Two TableViews
  • Next by thread: Re: How to Distinguish Between Two TableViews
  • Index(es):
    • Date
    • Thread