Re: Core Data To-Many Relationship KVO
Re: Core Data To-Many Relationship KVO
- Subject: Re: Core Data To-Many Relationship KVO
- From: Roland King <email@hidden>
- Date: Thu, 12 Feb 2015 08:36:59 +0800
> On 12 Feb 2015, at 08:27, Richard Charles <email@hidden> wrote:
>
>
>> On Feb 11, 2015, at 4:51 PM, Roland King <email@hidden> wrote:
>>
>> committing the core data changes removes them from all the relationships and fires KVO changes. see propagatesDeletesAtEndOfEvent: and commitPendingChanges. In AppKit usually deletes are propagated once around the event loop, in other places they won’t propagate until there’s a save or commitPendingChanges: is called.
>
>
> What “event” does propagatesDeletesAtEndOfEvent refer to? An event loop, some type of Core Data event? The documentation as I read it is unclear.
No idea - why don’t you put a breakpoint in your KVO handler and see where it’s being called from, my guess would be the end of the event loop. If you want it earlier try calling the method to process pending changes, or remove it from the relationship yourself as well as deleting it.
>
> Also commitPendingChanges: does not appear to be in any method of the Cocoa frameworks.
processPendingChanges:, it’s on NSManagedObjectContext
>
> Richard Charles
>
_______________________________________________
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