Forums BaseTen

NSPersistentDocument integration?

Subscribe to NSPersistentDocument integration? 2 post(s), 2 voice(s)

 
Avatar Sick Hack Boy 1 post

I’m trying to port this Document based CoreData app to BX and I’m kind of stuck at the document integration bit. Do I just override – (BOOL)configurePersistentStoreCoordinatorForURL:(NSURL )url ofType:(NSString *)fileType modelConfiguration:(NSString *)configuration storeOptions:(NSDictionary *)storeOptions error:(NSError *)error;

Also, do I need to override managedObjectModel and return some kind of Description to make that work? I’m not familiar with who calls this method on NSPersistentDocument.

Also, is this project still moving forward? The last release was nearly a year ago according to the wiki.

 
Avatar Tuukka Norri Administrator 25 post(s)

Hi and sorry about not replying earlier.

We haven’t designed BXDatabaseContext to be a drop-in replacement for NSManagedObjectContext. As a result, NSPersistentDocument most likely won’t work with BXDatabaseContext as it would with NSManagedObjectContext.

It seems that there is also some conceptual mismatch between a PostgreSQL-based client/server application and a Core Data document based application. In the latter, the document incorporates a whole database instance, stored in a file specified by the user, whereas with PostgreSQL you are likely to talk to the same (often remote) PostgreSQL server without control over where the data is physically stored. This difference makes most of the NSDocument architecture much less useful on a BaseTen project. One alternative is to make use of customized NSWindowController subclasses that would present some part of the database contents. The user could then open such windows the same way Finder allows the user to have many browser-style windows.

We are planning a new release as soon as possible. If you’d like, you can follow our progress here: http://basetenframework.org/timeline

Forums BaseTen