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

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

  • Follow-Ups:
    • Re: Dependent Keys
      • From: Jim Hamilton <email@hidden>
  • Prev by Date: Proper way to express relationships between classes
  • Next by Date: Re: NSTableView blurry contents
  • Previous by thread: Proper way to express relationships between classes
  • Next by thread: Re: Dependent Keys
  • Index(es):
    • Date
    • Thread