Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Object Hierarchies



> 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:
http://lists.apple.com/mailman/options/cocoa-dev/email@hidden

This email sent to email@hidden



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.