Re: CoreData and undo/redo : how to add a managed object with attributes already set in the undo/redo stack ?

2010-07-08 Thread Guillaume Laurent
On Jun 29, 2010, at 22:47 , Sean McBride wrote: I don't believe that's the right pattern. In awakeFromInsert/Fetch, one should be using primitive setters. The docs say If you want to set attribute values in an implementation of this method, you should typically use primitive accessor

Re: CoreData and undo/redo : how to add a managed object with attributes already set in the undo/redo stack ?

2010-07-08 Thread Guillaume Laurent
On Jun 28, 2010, at 12:33 , Mike Abdullah wrote: On 27 Jun 2010, at 00:01, Guillaume Laurent wrote: Hi all, I'm having difficulties with the undo/redo mechanism and my Core Data objects. The problem is that I create a CoreData object (say a rectangle), then set some of its

Re: CoreData and undo/redo : how to add a managed object with attributes already set in the undo/redo stack ?

2010-07-08 Thread Guillaume Laurent
On Jun 27, 2010, at 4:08 , Jerry Krinock wrote: On 2010 Jun 26, at 16:01, Guillaume Laurent wrote: I'm having difficulties with the undo/redo mechanism and my Core Data objects. Uh-huh. The problem is that I create a CoreData object (say a rectangle), then set some of its

Re: CoreData and undo/redo : how to add a managed object with attributes already set in the undo/redo stack ?

2010-07-01 Thread Jerry Krinock
On 2010 Jun 29, at 13:47, Sean McBride wrote: I don't believe that's the right pattern. In awakeFromInsert/Fetch, one should be using primitive setters. The docs say ... You're correct, Sean. I thought I got that pattern from some Apple sample code, but I can't find it now. Use of

Re: CoreData and undo/redo : how to add a managed object with attributes already set in the undo/redo stack ?

2010-06-29 Thread Sean McBride
On Sat, 26 Jun 2010 19:08:29 -0700, Jerry Krinock said: Bottom line : is there a way to make it so that the CoreData object's instantiation and its setup are registered as a single action in the undo/redo stack ? I presume that you are setting these attributes in -awakeFromInsert. One solution

Re: CoreData and undo/redo : how to add a managed object with attributes already set in the undo/redo stack ?

2010-06-28 Thread Mike Abdullah
On 27 Jun 2010, at 00:01, Guillaume Laurent wrote: Hi all, I'm having difficulties with the undo/redo mechanism and my Core Data objects. The problem is that I create a CoreData object (say a rectangle), then set some of its attributes according to some controls values (the position

CoreData and undo/redo : how to add a managed object with attributes already set in the undo/redo stack ?

2010-06-26 Thread Guillaume Laurent
Hi all, I'm having difficulties with the undo/redo mechanism and my Core Data objects. The problem is that I create a CoreData object (say a rectangle), then set some of its attributes according to some controls values (the position and size of a CALayer the user has just created in a view).

Re: CoreData and undo/redo : how to add a managed object with attributes already set in the undo/redo stack ?

2010-06-26 Thread Jerry Krinock
On 2010 Jun 26, at 16:01, Guillaume Laurent wrote: I'm having difficulties with the undo/redo mechanism and my Core Data objects. Uh-huh. The problem is that I create a CoreData object (say a rectangle), then set some of its attributes according to some controls values (the position and