Important: This sample code may not represent best practices for current development. The project may use deprecated symbols and illustrate technologies and techniques that are no longer recommended.
Version 1.2, 2009-07-24
Fixed crash that occurs when node is dragged to a descendent by adding logic to outlineView:validateDrop:proposedItem:proposedChildIndex:.
(Full Revision History)
Xcode 3.0, Mac OS X 10.5
Mac OS X 10.5
AbstractTree is a Cocoa sample application that demonstrates how to use Core Data and Bindings with NSTreeController. The data model is intentionally simple and abstract - you can extend it to any hierarchical model suitable for your problem domain. Likewise, the user interface is minimal - just an outline view and buttons for creating and removing nodes in the tree. In addition, the project shows how to implement drag and drop for managing parent-child relationships of the Core Data content.