Core Data Derived Values
Core Data Derived Values
- Subject: Core Data Derived Values
- From: Todd Yandell <email@hidden>
- Date: Wed, 6 Jul 2005 03:02:48 -0500
Hi,
I'm trying to implement derived values with Core Data. I want to use
it to display an individual's full name by combining several other
fields ("firstName", "lastName", etc.). In fact, what I'm trying to
do is exactly what the ADC article, "NSPersistentDocument Core Data
Tutorial" describes on the "Support for the Derived Value" page.
However, there's a problem with this for me. I'm using a relationship
to store the name information, and when the values change, I don't
get notified. Using the "setKeys:triggerChange..." method works great
when "keys" are attributes, but it (apparently) doesn't work for keys
that belong to relationships. Here's an example of what I'd like to
do, but what doesn't seem to work:
+ (void)initialize
{
NSArray *keys = [NSArray arrayWithObject:@"fullName"]; //
(fullName is a relationship)
[self setKeys:keys
triggerChangeNotificationsForDependentKey:@"displayName"];
}
Anyone have any suggestions?
Thanks,
Todd
_______________________________________________
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