When we have an object who has a property that's generated based on other
properties, usually we implement the
+keyPathsForValuesAffecting[PropertyName] class method.

What I'm trying to do is basically the same thing for a property on my
NSManagedObject, but traversing a relationship.

My model is simple; I have two Entities, App and Version (I'm creating an
appcast-generating app). There is a dynamic property - (NSString*) appcast;
which is generated based on all the details of the app and its versions
relationships. When the App's properties are changed, the -appcast string is
re-cached, and all bindings are updated appropriately, simply because I
implemented +keyPathsForValuesAffectingAppcast, as per the statement above.

However, when any properties on any of a specific App's Versions (to-many
relationship) change, the -appcast property is not generated appropriately.
Is there a way to have this dynamic property re-cached any time certain
(any) properties on its "versions" relationship are changed?

So far, I've tried to include "key paths" such as "versions.versionNumber"
in the NSSet returned from the aforementioned method, but that just throws
an exception that the key "versionNumber" does not exist on NSSet.

Thanks in advance for your responses, this has been boggling me for many
hours.

-Steven, www.degutis.org
_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to