• 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, array controller, and add:
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Core data, array controller, and add:


  • Subject: Core data, array controller, and add:
  • From: Dale Schack <email@hidden>
  • Date: Wed, 1 Nov 2006 14:51:49 -0700


Hello,

I have a data model that consists of Parent, which has a to-many relationship with a Child, which has the inverse relationship to Parent.

Each of these objects, Parent and Child, have associated NSArrayControllers. These controllers are used to set up a typical Master-Detail relationship. This displays the model data correctly, and is able to add:/remove: objects to/from the managed object context.

I now want to intercept the point where the newly created Child is added to its Parent, as I need to update a non-standard attribute that maintains ordering. I had thought to perform this in the Parent relationship methods (e.g. addChildObject:)

However, this method is not being called by the default NSArrayController add: method. Do I need to create a custom NSArrayController to ensure that addChildObject: is called on the Parent? Or am I missing something basic here?

Thanks,  Dale



_______________________________________________
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, array controller, and add:
      • From: mmalc crawford <email@hidden>
  • Prev by Date: Re: try catch not catching
  • Next by Date: Prevent DVD Player launch
  • Previous by thread: Re: [NSCalendar currentCalendar] leak
  • Next by thread: Re: Core data, array controller, and add:
  • Index(es):
    • Date
    • Thread