Re: Questions on using using modal sheets with Core Data

2009-06-14 Thread Kevin Ross
I'm able to get the dependent values to update correctly if I access the deepest path of the relationship before I set the value that will cause them to update. It seems like kind of a kludge, but it might be the best I can do right now until I can ferret out a possible missed dependency so

Re: Questions on using using modal sheets with Core Data

2009-06-12 Thread Kevin Ross
Thanks Dave, I'm creating a new MOC in the sheet and hooking it up to the same persistent store as the document, so when the NSArrayController performs it's initial fetch at load (I have it set in IB to automatically prepare content). I'm not actually using this context to add or remove a

Re: Questions on using using modal sheets with Core Data

2009-06-12 Thread Dave Fernandes
Kevin, You'll have to say a bit more about how you adapted the example. Do you create a new MOC and create new objects within it with attributes copied from the document MOC? Is there a Core Data relationship between these two new objects? What do you mean by "dependent on others" and "pro

Re: Questions on using using modal sheets with Core Data

2009-06-12 Thread Kevin Ross
I adapted the examples in the NSPersistentDocument tutorial, and this works great. The problem I'm having is with some of the state management because some of the properties are dependent upon others. I'll try to explain how the relationship works. Let's say we have 2 objects in the sheet

Re: Questions on using using modal sheets with Core Data

2009-06-11 Thread Dave Fernandes
This is explained in the NSPersistentDocument tutorial in the docs. On Jun 11, 2009, at 10:03 PM, Kevin Ross wrote: Hi all, have a Core Data document based application which uses modal sheets as a way for the user to edit the document's data. What is the best way to give the sheet the abili

Re: Questions on using using modal sheets with Core Data

2009-06-11 Thread Kevin Ross
Jeez, I forgot to explain that posting the notification would happen when the user accepts the changes made in the modal window. I hope it make a little more sense now. Thanks, Kevin On Jun 11, 2009, at 7:03 PM, Kevin Ross wrote: Hi all, have a Core Data document based application which

Questions on using using modal sheets with Core Data

2009-06-11 Thread Kevin Ross
Hi all, have a Core Data document based application which uses modal sheets as a way for the user to edit the document's data. What is the best way to give the sheet the ability to operate on a copy of the data with the parents sheet's undo context? And how best to merge these changes wit