Dependent Keys
Dependent Keys
- Subject: Dependent Keys
- From: "Marcus S. Zarra" <email@hidden>
- Date: Wed, 17 Aug 2005 11:59:20 -0600
I am trying to set up a dependent key that is dependent on the value
stored inside of a child object. Specifically, assuming I have the
following two objects in Core Data:
Parent<-->>Child
Inside of the child object is a field called "value". In the parent I
want to update a dependent key based on changes to this value. In the
parent's initialize method I have placed the following code:
+ (iniitalize) {
NSArray *keys = [NSArray arrayWithObjects:@"children.value", nil];
[self setKeys:keys triggerChangeNotificationsForDependentKey:@"dependent"];
}
The issue is that whenever I change the child's value the dependent
key is not being fired/called.
Two questions:
1. Is this possible? Can I use the dependent key notification with a keyPath?
2. If it is possible, what am I doing wrong?
Thanks,
Marcus S. Zarra
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden