• 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 dependent attributes
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Core data dependent attributes


  • Subject: Core data dependent attributes
  • From: Matteo Manferdini <email@hidden>
  • Date: Fri, 26 May 2006 20:32:30 +0200

Hi everyone. I have a data model in core data in which an object has a numeric attribute that depends on some calculations on attributes of objects in a to many relationships. I need to keep this attribute up to date.
If I were using a standard object I know I would have to use KVO, but I don't know how to do this in core data's managed objects.
Since this attribute depends solely on other attributes, I don't need to save it. Looking at core data's docs, I think I have to implement a custom accessor method to compute the value. Is this right?
Moreover, can I use KVO in managed objects, so when the attributes change the derived attribute will change as well? (somethin like "Registering dependent keys" in KVO programming guide http:// developer.apple.com/documentation/Cocoa/Conceptual/KeyValueObserving/ Concepts/DependentKeys.html but using attributes of other objects).
One last question: core data programming guide states that I can use the Xcode data modeling tool to generate the code for accessor methods for any modeled property. How can I exactly do this?
Thank you very much.
Cheers.


---
Matteo Manferdini
_______________________________________________
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 dependent attributes
      • From: "Seth Barber" <email@hidden>
    • Re: Core data dependent attributes
      • From: Sean Murphy <email@hidden>
  • Prev by Date: Height of wrapped attributed string with -boundingRectWithSize:options:
  • Next by Date: Re: Text/Font Size Measurement
  • Previous by thread: Height of wrapped attributed string with -boundingRectWithSize:options:
  • Next by thread: Re: Core data dependent attributes
  • Index(es):
    • Date
    • Thread