[object setValue:@"1" forKey:@"attr"];
[self forceUndoBoundaryInContext:context];
[object setValue:@"2" forKey:@"attr"];
This is a little odd. If this is in the UI thread, it will be
confusing to the user in the typical scenarios. Are you sure you
don't want to create a nested undo group ?
I agree with Ben that this seems somewhat odd to do, but that said:
NSManagedObjectContext coalesces changes for registering with the undo
manager, but NSUndoManager also performs its own grouping. -
processPendingChanges just provides a means for forcing the MOC to
register its changes when
Peter,
I'm using CoreData for some internal state management that sometimes
requires an undo boundary in a specific place. In other words, I need
something along these lines to work:
NSManagedObject *object = [self getObjectFromSomewhere];
NSManagedObjectContext *context = [object managedObjec
I'm using CoreData for some internal state management that sometimes
requires an undo boundary in a specific place. In other words, I need
something along these lines to work:
NSManagedObject *object = [self getObjectFromSomewhere];
NSManagedObjectContext *context = [object managedObjectCont