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 protected])

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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to [email protected]

Reply via email to