Re: file references in CoreData
Re: file references in CoreData
- Subject: Re: file references in CoreData
- From: Paul Thomas <email@hidden>
- Date: Wed, 29 Oct 2008 11:05:50 +0000
I'm currently working on a system that uses NDAlias (http://codebeach.org/code/show/34
) in a CoreData store. It works pretty well in that the user can move
the files around when the app isn't running and (so long as they stay
on the same volume) it'll find them again when it wakes up.
I'm using mogenerator (http://rentzsch.com/code/mogenerator), so I set
the attribute to the 'Transformable' and add to the user info (in the
user tab of the model editor the key: 'attributeValueClassName' and
value: 'NDAlias'. I also had to modify the standard template to
#import "NDAlias.h" which is a little hacky - but I didn't have time
to follow it up.
If you do use NDAlias, keep in mind that the factory you will most
likely use +[NDAlias aliasFromPath] only creates a minimal alias that
doesn't follow moved files (and seems a little pointless to me!) so
use one of the other methods (where you specify a relative path).
pt.
P.S. if you use mogenerator and find an elegant fix for the missing
header problem, please submit a patch to the author so we can all
benefit.
On 29 Oct 2008, at 08:44, Georg Seifert wrote:
hello,
I’m very new to CoreData and can’t find anything on this:
I need to store references to local files in CoreData. What is the
best solution for this. Just now I use plain paths but there has to
be a better way.
Thanks
Georg_______________________________________________
Cocoa-dev mailing list (email@hidden)
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:
This email sent to email@hidden
_______________________________________________
Cocoa-dev mailing list (email@hidden)
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:
This email sent to email@hidden