• 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
Re: Core Data : where are the docs ?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Core Data : where are the docs ?


  • Subject: Re: Core Data : where are the docs ?
  • From: Eric Morand <email@hidden>
  • Date: Sun, 4 Sep 2005 12:07:35 +0200

Thanks !

I've been reaƩding the docs all night long and have come to the conclusion that :

- My app IS a document-based one even though I didn't understand at all what a document was at first.
- I should have understood by myself that Andre was talking about NSPersistentDocument.




Thanks for your help and advices. I have a lot of personal work to do before starting using Core Data (and replace my own SQLite wrapper) but that looks worse the pain.





Eric.




On Sep 3, 2005, at 4:34 PM, Eric Morand wrote:


My app is not a document based app. Or is it ?


Seriously, if you don't know whether your application is document- based or not, then you should probably not yet be using Core Data. You need to understand more about Cocoa application architecture in general first.


I'm pretty sure I've missed a critical documentation that explains what to do with this file, how to associate it with a NSManagedObjectModel instance of my app.


A model is a project resource. If you create an application using one of the Core Data templates, then it's loaded for you -- either because NSPersistentDocument loads it for you automatically (<http://developer.apple.com/documentation/Cocoa/Reference/ ApplicationKit/ObjC_classic/Classes/NSPersistentDocument.html#// apple_ref/doc/uid/TP30001179-CJBJBIHA>) or because the code is written for you in the template (see the first few lines of DeleteAppDelegate.m):

#import "DeleteAppDelegate.h"

@implementation DeleteAppDelegate

- (NSManagedObjectModel *)managedObjectModel {
    // ...



Worse, I don't know how to fetch from the NSManagedObjectContext since it is only accessible from my app delegate and not from my other window controllers (I have a lot of them) ! Should I add a reference to it on every controller I had to my app ? I sure hope no...


This is not a Core Data problem, this is a general application architecture problem. See again the first suggestion...
But yes, if you want to fetch using a specific context, you need a reference to it. In the same way you would if you had any global data in an application...



Ih, and last question (once more, I've not found anything about it in the docs I've read) : what are the differences between the persistent storage types (SQL, XML...) and which one should I use in which case ?


<http://developer.apple.com/macosx/coredata.html>



Sorry for the flood, I forgot to ask about this : what is NSManagedDocument ? I can't find it in Xcode Documentation ?


There is no such thing -- there is NSPersistentDocument.

mmalc

_______________________________________________
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


_______________________________________________ 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
References: 
 >Core Data : where are the docs ? (From: Eric Morand <email@hidden>)
 >Re: Core Data : where are the docs ? (From: Andre <email@hidden>)
 >Re: Core Data : where are the docs ? (From: Eric Morand <email@hidden>)
 >Re: Core Data : where are the docs ? (From: mmalcolm crawford <email@hidden>)

  • Prev by Date: Re: Avoiding UI hangs
  • Next by Date: Re: Avoiding UI hangs
  • Previous by thread: Re: Core Data : where are the docs ?
  • Next by thread: Re: Core Data : where are the docs ?
  • Index(es):
    • Date
    • Thread