• 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: Facile Core Data Question
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Facile Core Data Question


  • Subject: Re: Facile Core Data Question
  • From: "Kyle Sluder" <email@hidden>
  • Date: Sat, 22 Nov 2008 22:07:43 -0500

On Sat, Nov 22, 2008 at 9:37 PM, Jamie Hardt <email@hidden> wrote:
> How to I cause a managed object to perform a certain action upon deletion?
>  If I were working with Ruby On Rails or some other ORMs, I'd be able to
> define an on_delete method or action that would automatically be invoked.
>  In core data, it seems that the best thing to do is to have a godlike
> object listening for the
> "NSManagedObjectContextObjectsDidChangeNotification" and doing the action
> upon the object's removal.

I don't see why this requires a god object; why can't your
model-controller (NSPersistentDocument subclass) register for this
notification?  Or, for that matter, whatever object needs to perform
the action?

--Kyle Sluder
_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Follow-Ups:
    • Re: Facile Core Data Question
      • From: Jamie Hardt <email@hidden>
References: 
 >Facile Core Data Question (From: Jamie Hardt <email@hidden>)

  • Prev by Date: Re: How do I get a CGContextRef?
  • Next by Date: Re: How do I get a CGContextRef?
  • Previous by thread: Facile Core Data Question
  • Next by thread: Re: Facile Core Data Question
  • Index(es):
    • Date
    • Thread