• 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
Re: 'Touching' managed objects properties.
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: 'Touching' managed objects properties.


  • Subject: Re: 'Touching' managed objects properties.
  • From: mmalcolm crawford <email@hidden>
  • Date: Wed, 13 Jul 2005 20:41:41 -0700


On Jul 13, 2005, at 7:17 PM, Óscar Morales Vivó wrote:

I have a model with a Person entity that has the following attributes:
- isMale (Boolean)
- children (to-many relationship to Person)
- parents (to-many relationship to Person, inverse of children).
- father (fetched property. Retrieves the male parent).
- mother (fetched property. Retrieves the female parent).
The code already takes care of guaranteeing there's only a maximum of a male and a female parent at the same time.


This will give rise to some localisation issues  ;-)

If I modify isMale, I want the children (if any) to notify that the value of their father and mother properties have changed. However I haven't seen any way to manually 'touch' those properties. For the ones inside a single object I called setKeys:triggerChangeNotificationForDependentKey (which works fine).
Right now I have it set with a call to [self setKeys:[NSArray arrayWithObject:@"isMale"] triggerChangeNotificationForDependentKey:@"children"] and it works fine as far as updating the UI is concerned. But I'd like to have a more finely granular solution.


You can't register dependencies across objects. A child must observe its parents' isMale attribute.

mmalc

_______________________________________________
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


References: 
 >'Touching' managed objects properties. (From: Óscar Morales Vivó <email@hidden>)

  • Prev by Date: Re: How to get container when overriding NSCreateCommand
  • Next by Date: Multiple pasteboard items
  • Previous by thread: 'Touching' managed objects properties.
  • Next by thread: Multiple pasteboard items
  • Index(es):
    • Date
    • Thread