• 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: Dictionaries or custom class containing no methods?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Dictionaries or custom class containing no methods?


  • Subject: Re: Dictionaries or custom class containing no methods?
  • From: Quincey Morris <email@hidden>
  • Date: Tue, 17 Jun 2014 15:46:38 -0700

On Jun 17, 2014, at 15:21 , Trygve Inda <email@hidden> wrote:

> Thoughts on the pros and cons of both methods?

I strongly agree with Lee Ann that the custom class is a better approach. It almost always happens that you (eventually) want to associate behavior with the properties. There can also be issues trying to use bindings and KVO on values stored in a dictionary, when the relationship between the values and the UI gets more complex. I always find myself rewriting quickie dictionaries as classes, and swearing not to take the shortcut next time.

_______________________________________________

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: 
 >Dictionaries or custom class containing no methods? (From: Trygve Inda <email@hidden>)

  • Prev by Date: Re: Dictionaries or custom class containing no methods?
  • Next by Date: Re: Dictionaries or custom class containing no methods?
  • Previous by thread: Re: Dictionaries or custom class containing no methods?
  • Next by thread: Bindings setup with NSCollectionViews
  • Index(es):
    • Date
    • Thread