Hi, I'm having trouble importing into my application using Core Data. I have an 
NSAtomicStore based storage system. I can open and save my own files, but when 
someone wants to import from another format, I want to load the file and set 
the file name to nil so that I can save it as my own file type.

I have overridden -readFromURL:ofType:error:, and if it's one of the types I 
want to import, I spawn a separate process which converts it to my file type 
and then I call super with the newly created file that I want to read, and then 
set the file url to nil and set the file type to my file type, so that I end up 
with an untitled file which I should be able to save.

The problem is that when I save, it starts off with the standard operation of 
creating the temporary file in the folder "(A Document Being Saved By...)", but 
then it goes wrong - instead of updating and saving back to that temporary 
file, it saves the file at the location it was originally loaded from.

This leads me to the conclusion that something in the persistent store or 
managed object system has kept track of where it was originally stored, and is 
confused by the fact that I have set the url and file type.


Does anyone know how I should be doing this so that I don't have this problem?


I hope this explanation is clear enough - let me know if you need more 
information...



Thanks

Gideon


_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to