• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Loading Entities from a CoreData document
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Loading Entities from a CoreData document


  • Subject: Loading Entities from a CoreData document
  • From: David Zwerdling <email@hidden>
  • Date: Thu, 16 Apr 2009 22:04:33 -0700

Dear List,
A while ago I wrote a simple application in which users create and manipulate CoreData entities named "DataSets". Simple enough. I used the document preset so I didn't have to deal with any of the file writing stuff.


Anyways, I'm writing a new application that uses these data sets. Users save the file from the prior application and can "import" data sets into this new application. At least, hypothetically at this point. The issue is, when using code like this (url points to a document full of data sets):

NSPersistentDocument *pd = [NSPersistentDocument new];
BOOL success = [pd configurePersistentStoreCoordinatorForURL:url ofType:NSXMLStoreType modelConfiguration:nil storeOptions:nil error:&error];
NSSet *ros = [[pd managedObjectContext] registeredObjects];


success comes back true, but there are no managed objects in 'ros'.

So, is there some sample code I can see which loads the managed objects of an xml file? I've looked pretty exhaustively and everything seems too high level (relying on the single-file model that I implemented in my original application.) Am I missing something silly?
Thanks in advance,
Dave
_______________________________________________


Cocoa-dev mailing list (email@hidden)

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:
This email sent to email@hidden


  • Follow-Ups:
    • Re: Loading Entities from a CoreData document
      • From: mmalc Crawford <email@hidden>
    • Re: Loading Entities from a CoreData document
      • From: Jerry Krinock <email@hidden>
  • Prev by Date: Re: Setting up an auxiliary task for use with Distributed Objects
  • Next by Date: Re: Loading Entities from a CoreData document
  • Previous by thread: NSMetadataQueryDidUpdateNotification problem with volumes
  • Next by thread: Re: Loading Entities from a CoreData document
  • Index(es):
    • Date
    • Thread