Re: Core Data undo grouping

2008-10-03 Thread Peter Sagerson
[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 ?

Re: Core Data undo grouping

2008-10-03 Thread Mike Abdullah
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

re: Core Data undo grouping

2008-10-02 Thread Ben Trumbull
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

Core Data undo grouping

2008-10-02 Thread Peter Sagerson
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