• 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: Changing classes
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Changing classes


  • Subject: Re: Changing classes
  • From: "email@hidden" <email@hidden>
  • Date: Thu, 30 Sep 2010 22:45:34 +0100

On 30 Sep 2010, at 20:35, Allen Ingling wrote:

> On Thu, Sep 30, 2010 at 2:28 PM, Remco Poelstra <email@hidden> wrote:
>
>> Hi,
>>
>>
> Maybe a class cluster would be useful here?
>
Clustering might be a solution but it's a bit of a heavyweight pattern.

Trying to dynamically match a stepwise revealed information structure to a particular class in a hierarchy sounds fragile.
If an individual hardware item property doesn't match the class hierarchies expectations then you have to subclass.

If a specific class is not necessary for each hardware item then it might be possible to think in terms of a single
or small number of generic classes.
The specificity of these base classes can be extended by the use of associative storage property (an NSDictionary instance).
ie: dump all the hardware properties into the dictionary then query it as and when required.

This would give a lot of type flexibility without excessive subclassing.

Regards

Jonathan Mitchell

Developer
Mugginsoft LLP
http://www.mugginsoft.com

_______________________________________________

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: Changing classes
      • From: Kyle Sluder <email@hidden>
References: 
 >Changing classes (From: Remco Poelstra <email@hidden>)
 >Re: Changing classes (From: Allen Ingling <email@hidden>)

  • Prev by Date: Re: Exceptions to the "don't use -[NSManagedObject dealloc]" rule?
  • Next by Date: Re: Changing classes
  • Previous by thread: Re: Changing classes
  • Next by thread: Re: Changing classes
  • Index(es):
    • Date
    • Thread