In the documentation, it says that I have to override:

type
identifier
setIdentifier
metadata
metadataForPersistentStoreWithURL:error:
setMetadata:forPersistentStoreWithURL:error:

from NSPersistentStore in addition to the overrides for NSAtomicStore, but the 
CustomAtomicStoreSubclass example doesn't implement the metadata method at all, 
and the documentation says that the NSPersistentStore provides a default 
implementation of identifier.

So I have some questions:

1. Do I actually need to override identifier and setIdentifier in my subclass, 
or is it OK for me to just rely on the default implementation I inherit from 
NSPersistentStore? From the documentation, it sounds as if the default 
implementation would be sufficient.

2. Do I actually need to override the metadata method, given the fact that the 
example code doesn't? It appears to be able to call the superclass methods OK, 
and the documentation of NSAtomicStore says that it implements a default 
dictionary of metadata, and I just have to ensure that it is saved. Sounds as 
if the default implementation should be sufficient.

3. It appears that I have to write the metadata out to file with the rest of 
the data for the application. Our application is cross platform, and it is 
possible that the file may be read and altered on the Windows version. If it 
was written back again without the metadata, what would the impact of that be? 
Actually there would be other cases where third party utilities could create 
one of our files, and they would not know what to write into the metadata. 
Could I just ask the atomic store for its metadata without using setMetadata, 
and get back a value that I could use (and subsequently store)?

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