Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

initializing new documents #29

Open
mgrubb opened this issue Oct 9, 2014 · 1 comment
Open

initializing new documents #29

mgrubb opened this issue Oct 9, 2014 · 1 comment

Comments

@mgrubb
Copy link

mgrubb commented Oct 9, 2014

I'm using the additional content support of BSManagedDocument and I'm curious as to the best place to put initialization code for new "Untitled" documents from the additional content perspective. For typical NSDocument subclasses one would use initWithType:error:, and for initializing CoreData aspects of the document with BSMD I am assuming that configurePersistentStoreCoordinatorForURL:ofType:modelConfiguration:storeOptions:error: is where I would do that. If I override initWithType:error: will that interfere with the CoreData initialization that BSMD handles? Thanks for any input.

@mikeabdullah
Copy link
Collaborator

You should be fine to treat this like any regular document (assuming you're not planning to do something like writing to disk), and override initWithType:error:. Just make sure to call super! (I imagine failing to call it would break a great deal more than BSManagedDocument, mind 😄)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants