Retired Document
Important: This tutorial uses tools and techniques for Mac OS X v10.4. If you are targeting Mac OS X v10.5 or later, see instead NSPersistentDocument Core Data Tutorial.
This document will not be modified in the future.
Introduction to NSPersistentDocument Core Data Tutorial for Mac OS X v10.4
The task goal of this tutorial is to create a document-based application that allows a user to display and modify information about a department, employees in the department, and managerial relationships between the employees.
This tutorial takes you through the steps of building a simple Core Data–based application using NSPersistentDocument
and Cocoa bindings. NSPersistentDocument
is a subclass of NSDocument
that integrates with the Core Data framework. You will find this tutorial useful if you’re using the Core Data framework to create a document-based application.
Who Should Read This Document
You should read this document to gain an understanding of how to create a Core Data document-based application using NSPersistentDocument
and Cocoa bindings. Among other concepts, you will learn how to create the project, how to customize the creation of a document, and how to localize error messages.
Organization of This Document
Overview of the Tutorial describes the application you will create, and the task constraints.
Creating the Project, Model, and Interface describes how you create a Core Data document-based project in Xcode, and how you create the data model and how you can use it to automatically create a default user interface.
Creating a Custom Class describes how to implement a custom class for an entity.
Adding a Department Object describes how you add a Department object to the document, and configure the user interface appropriately.
Copy and Paste describes one way you can support copy and paste in a Core Data application.
Localizing and Customizing Model Property Names and Error Messages describes how you can localize property names and customize alert panels.
Document Metadata describes how you can add metadata to your document that Spotlight can extract—it also describes how you write the Spotlight importer.
A Sheet for Creating a New Employee describes how you can use a sheet for data entry.
See Also
Core Data Programming Guide describes functionality provided by the Core Data framework from a high-level overview to in-depth descriptions.
Core Data Utility Tutorial takes you through the steps of building a command-line utility that uses Core Data. You are strongly encouraged to complete the low-level tutorial before following this tutorial.
Copyright © 2005, 2009 Apple Inc. All Rights Reserved. Terms of Use | Privacy Policy | Updated: 2009-02-04