How to set the configuration of an NSPersistentDocument?
How to set the configuration of an NSPersistentDocument?
- Subject: How to set the configuration of an NSPersistentDocument?
- From: email@hidden
- Date: Sun, 11 Jun 2006 11:41:49 -0700
Hi,
I have a model where there are certain entities that are non-editable
but are used to populate default data in an NSPersistentDocumentBased
app.
I use configurations to isolate this (like in iClass example) and add
the (non-writable) configurations by overriding -managedObjectContext.
So, when I save a document, only the items the user created are saved
to the persistent store they saved to, but its (the user's data) not
really specified directly in the configuration.
IOW, I have a configuration called "private" that is loaded for each
persistent document, and populates default data, and whatever other
managed objects the user
creates are automatically saved in the file they create (just like I
want), but I feel its maybe not reliable because it just saving
whatever is not in a specific configuration (private).
If I have more than 2 stores, it gets more complicated, and would
like to be able to set the configuration of a blank document to
absolutely prevent any ambiguity.
Is this possible? I cant seem to find it in the documentation for
NSPersistentDocument....
Thanks!
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden