> On Aug 3, 2016, at 11:04 PM, Jerome Krinock <je...@ieee.org> wrote:
> 
> 
>> On 2016 Aug 03, at 07:56, maximilian.schm...@mto.io wrote:
>> 
>> can CoreData solve this?
> 
> If you are using Core Data for other reasons, then you should consider using 
> BSManagedDocument, and you should read the discussion of saving and copying 
> “additional content”, (which would be your audio files), which I had last 
> year:
> 
> https://github.com/karelia/BSManagedDocument/issues/45
> 
> But if you are not already using Core Data in this app for other reasons, I 
> don’t think it offers much more than NSDocument for your issue, and with the 
> additional complexity, you probably don’t want Core Data.

Hey Jerome! Very similar issue you had there! I was thinking about dropping the 
duplicate feature but I’m close to solving it with my current approach (which 
is also using the FileManager to copy the files around). 

If your interested: I force an auto save onto the duplicated document (which is 
a copy of the old one without the audio files) and then copy all the audio 
files from the original into the auto save. When the user then saves the 
duplicate, I copy the files from the autosave to the new user-defined 
destination. The only problem right now is intercepting the function where the 
app automatically deletes the autosaves so can safely copy before that happens. 
Haven’t found that yet.

I don’t think using CoreData will be to any value to me when I look at my 
current design. The NSDocument can very well handle all the objects inside my 
app. So I don’t use CoreData. But I thought maybe it's able to manage the audio 
files for me when duplicating or reverting the document or moving it to iCloud. 
But reading through the CoreData getting started guide gave me no such clues.

Thanks for your input! I guess I’ll keep working on my current approach then.

> _______________________________________________
> 
> 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:
> https://lists.apple.com/mailman/options/cocoa-dev/maximilian.schmidt%40mto.io
> 
> This email sent to maximilian.schm...@mto.io



_______________________________________________

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:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

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

Reply via email to