From: Pierce T. W. I. <pi...@tw...> - 2008-02-29 21:21:08
|
On Feb 29, 2008, at 10:50 AM, Avram Lyon wrote: > On Fri, Feb 29, 2008 at 9:40 PM, Pierce T. Wetter III > <pi...@tw...> wrote: >> The code: >> >> @storeMetaDeta >> =NSPersistentStore.metadataForPersistentStoreWithURL_error(url,error) > > Looking at the class documentation > (http://developer.apple.com/documentation/Cocoa/Reference/NSPersistentStore_Class/Reference/NSPersistentStore.html#/ > /apple_ref/occ/clm/NSPersistentStore/ > metadataForPersistentStoreWithURL:error:), > NSPersistentStore.metadataForPersistentStoreWithURL_error is supposed > to be a class method. Yes, it is. > > > Could RubyCocoa be mangling the mapping? > > Try initializing a store instance with > initWithPersistentStoreCoordinator:configurationName:URL:options: and > then use metadataForPersistentStoreWithURL_error on the instance. I > realize that defeats the purpose of getting metadata with a class and > not instance method, but it might help understand what's going on. I'm in sort of a catch-22. I can't build a persistentStoreCoordinator without an NSManagedObjectModel. I can't build one of those because @managedObjectModel = OSX::NSManagedObjectModel.mergedModelFromBundles(allBundles.allObjects) is choking, giving me an exception for trying to insert nil in an NSArray. So I'm trying to do this instead: @managedObjectModel = OSX ::NSManagedObjectModel .mergedModelFromBundles_forStoreMetaData (allBundles.allObjects,@storeMetaData) but in order to do that, I have to be able to extract the metadata from the file without creating a store... Pierce |