• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Core Data Derived Values
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


  • Follow-Ups:
    • Re: Core Data Derived Values
      • From: Robert McNally <email@hidden>
  • Prev by Date: Unwanted Deployment folder
  • Next by Date: Re: CoreData - inspector view?
  • Previous by thread: Re: Unwanted Deployment folder
  • Next by thread: Re: Core Data Derived Values
  • Index(es):
    • Date
    • Thread