Re: Copying Managed Objects from App to Doc MOContext

2009-07-28 Thread Ben Trumbull
On Jul 28, 2009, at 5:36 PM, Jerry Krinock wrote: But for restoring previous state over an existing object, that's undesirable. There are other more complicated approaches, but ultimately handling NSNull in your restore code is the least bad approach. In what practical situation would

Re: Copying Managed Objects from App to Doc MOContext

2009-07-28 Thread Jerry Krinock
On 2009 Jul 28, at 16:07, Ben Trumbull wrote: Accessor methods don't accept NSNull in place of NSString. Yes. I think I understand this now -- I was having trouble with your terms "copy/snapshot" and "restore". Accessor methods don't accept NSNull...the swapping has to happen in your c

Re: Copying Managed Objects from App to Doc MOContext

2009-07-28 Thread Ben Trumbull
On Jul 28, 2009, at 3:59 PM, Jerry Krinock wrote: Last December I asked a question here regarding how I should copy attributes from an existing managed object to a new managed object, when it is necessary to create this new object in a different managed object context. I noted that gettin

Re: Copying Managed Objects from App to Doc MOContext

2009-07-28 Thread Jerry Krinock
Last December I asked a question here regarding how I should copy attributes from an existing managed object to a new managed object, when it is necessary to create this new object in a different managed object context. I noted that getting an "attributes dictionary" from the existing mana

re: Copying Managed Objects from App to Doc MOContext

2008-12-22 Thread Ben Trumbull
My app maintains in its managed object context an array of, say, Potato objects. The potatoes in this central managed object context come and go occasionally -- someone might throw in a new one, or eat one. An archived potato is low in calories, consisting of a half dozen numbers or short string

Re: Copying Managed Objects from App to Doc MOContext

2008-12-20 Thread Kyle Sluder
On Sat, Dec 20, 2008 at 9:29 PM, Jerry Krinock wrote: > Both. The app-wide MOC has its PSC set to the app-wide PSC, which in turn > has a persistent store in the Application Support folder. OK, good, glad I understood you there. > By UUID, I believe you mean [[[self objectID] URIRepresentation]

Re: Copying Managed Objects from App to Doc MOContext

2008-12-20 Thread Dave Fernandes
I am doing something very similar to you. I have an application-based library of potatoes, and each document has a copy of some of those potatoes. I did this because the document may be opened on another computer that does not have access to the same library (or as you mention, the library

Re: Copying Managed Objects from App to Doc MOContext

2008-12-20 Thread Jerry Krinock
On 2008 Dec, 20, at 17:55, Kyle Sluder wrote: This doesn't make sense... you don't store arrays in managed object contexts. Whoops. Indeed, that does not make sense. I should have said that there are potatoes inserted into the app's central managed object context. They're not in an arr

Re: Copying Managed Objects from App to Doc MOContext

2008-12-20 Thread Kyle Sluder
On Sat, Dec 20, 2008 at 6:58 PM, Jerry Krinock wrote: > My app maintains in its managed object context an array of, say, Potato > objects. The potatoes in this central managed object context come and go > occasionally -- someone might throw in a new one, or eat one. An archived > potato is low i

Copying Managed Objects from App to Doc MOContext

2008-12-20 Thread Jerry Krinock
My app maintains in its managed object context an array of, say, Potato objects. The potatoes in this central managed object context come and go occasionally -- someone might throw in a new one, or eat one. An archived potato is low in calories, consisting of a half dozen numbers or short