• 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
Creating Subclass in Core Data
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


  • Follow-Ups:
    • Re: Creating Subclass in Core Data
      • From: Volker in Lists <email@hidden>
  • Prev by Date: Re: Small animation inside NSCell (progress bar)
  • Next by Date: Re: Creating Subclass in Core Data
  • Previous by thread: Obtaining Display EDID (DDC) Information From User Level App
  • Next by thread: Re: Creating Subclass in Core Data
  • Index(es):
    • Date
    • Thread