That's true, processPendingChanges is used by the context to implement
undo functionality but there's no reason why you can't call it
yourself after your delete since you've disabled the context's undo
functionality.
Here's an example where events is an NSArrayController:
- (IBAction)del
I guess processPendingChanges is only called if there is an
undoManager? Correct? I don't have one - I disabled it intentionally.
I've tried that notification, its only fired on save of the context.
Thanks
--
John Clayton
Skype: johncclayton
On 18/11/2008, at 1:22 PM, Ashley Clark wrote:
According to the documentation and to my quick test, the
NSManagedObjectContextObjectsDidChangeNotification is sent during
processPendingChanges. At the very least that happens at the end of
every event loop automatically. Even if you've bypassed your event
loop somehow you can still call p
On Nov 17, 2008, at 22:54, John Clayton wrote:
I'm basically looking to restore some state on an object at time of
deletion, e.g.
if A is associated with B via a to-many relationship from A->B, then
when one instance of B is deleted - we need to change a property on A.
If a B is delete,
Thanks Jim, unfortunately all occur either at pre-save or save time,
which is too late.
I'm basically looking to restore some state on an object at time of
deletion, e.g.
if A is associated with B via a to-many relationship from A->B, then
when one instance of B is deleted - we need to ch
On Nov 17, 2008, at 4:51 PM, John Clayton wrote:
I'm using core-data and need to know when a particular core-data
object (derived from NSManagedObject of course) is about to be
deleted. I'm deleting objects simply by using the managed object
context's deleteObject method, like this:
Hi All,
I'm using core-data and need to know when a particular core-data
object (derived from NSManagedObject of course) is about to be
deleted. I'm deleting objects simply by using the managed object
context's deleteObject method, like this:
[[theObject managedObjectContext] del