Re: Object Hierarchies
Re: Object Hierarchies
- Subject: Re: Object Hierarchies
- From: Sam Colombo <email@hidden>
- Date: Sun, 29 Apr 2007 20:39:47 -0500
> I'm not quite sure what "the hard way" is, or why you think Cocoa would be
> any different. However, off the top of my head, this sounds like perhaps a
> job for Core Data, which is all about abstracting the commonly needed
> behaviors of object graphs. m.
>
Although we originally used a certain amount of inherited commonality in
the C++ version, everything was done by type at each individual level, and
there was a lot of code for instance variables. If I'm beginning to
understand bindings correctly, it seems like we could avoid a lot of code by
using the same basic arrays and controllers for all levels and connect
interfaces to instance variables by use of key paths and by keys in a
dictionary at each level. I'm not really looking at the coredata
implications yet, preferring PostgreSQL, but it seems that bindings might do
what we want in object hierarchy. Again, what stimulated this thinking was
the MailDemo example at cocoadevcentral.com where there is a list of
mailboxes, each having a list of emails, and the instance variables were
stored in keyed dictionaries. It appears that you don't have to mess with a
lot of accessors this way -- you just use the key paths into the desired
dictionary. (Of course, maybe now I've over-bought into the bindings
approach.)
_______________________________________________
Cocoa-dev mailing list (email@hidden)
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