Creating Subclass in Core Data
Creating Subclass in Core Data
- Subject: Creating Subclass in Core Data
- From: Paul Franz <email@hidden>
- Date: Sun, 22 Feb 2009 14:19:06 -0500
I have a simple class hierarchy defined in Model for the Core Data Entity:
Class: AbstractClass (Abstract Class is checked as abstract
Parent Class: None
Attributes:
Name
Children
Class: Class1
Parent Class: AbstractClass
Attributes: None
Class: Class2
Parent Class: AbstractClass
Attributes:
Description
Cost
How do I create a subclass of Class1 or Class2 instead of the abstract class
AbstractClass?
I have created a NSTreeController in IB. The Attributes tab for the
NSTreeController, the Key Paths (Children) is set to "Children" and Object
Controller (Mode) is set to "Entity" with the Entity Name is set to
"AbtractClass". I have a NSOutlineView which is bound to this NSTreeController.
And a "New" button to create a new entity is bound to the "add" method of the
NSTreeController and a "New Child" button to create a new child is bound to the
"addChild" method of the NSTreeController. It seems to work. But I have no idea
what types of entities are being created. My assumption is that they are of type
"AbstractClass".
Paul Franz
_______________________________________________
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