re: Programatically set file URL of Core Data Document?

2009-05-19 Thread Ben Trumbull
I'm trying to programatically set the initial file url (path, filename) of an Core Data NSPersistentDocument, or if that is not possible, at least populate the Save panel with an initial filename. This is more an NSDocument / UI problem. Pushing this down into the model layer will make Core

Re: Programatically set file URL of Core Data Document?

2009-05-19 Thread Jerry Krinock
Thanks, Ben. With the background you provided, after a couple hours of trial and error I finally devised a method that seems to work, shown below in -[NSPersistentDocument saveMoveToNewPath:error_p:]. Indeed, it is necessary to jump through quite a few hoops, and to do so in just the

Programatically set file URL of Core Data Document?

2009-05-18 Thread Jerry Krinock
I'm trying to programatically set the initial file url (path, filename) of an Core Data NSPersistentDocument, or if that is not possible, at least populate the Save panel with an initial filename. At first, I was using -[NSDocument saveToURL:ofType:forSaveOperation:error:]. That worked