Append a Group with Core Data

Discussion in 'Mac Programming' started by Garrett, Jul 18, 2008.

  1. Garrett macrumors regular

    Joined:
    Apr 4, 2007
    #1
    Hello, again!

    Here is my current NSOutlineView:
    [​IMG]

    I am trying to figure out how to append a "Group", so it, it's all wrapped like:
    [​IMG]

    Anyone have any ideas? I would assume I need to grab all my data, and append a group before inserting it?
     
  2. Garrett thread starter macrumors regular

    Joined:
    Apr 4, 2007
  3. Garrett thread starter macrumors regular

    Joined:
    Apr 4, 2007
  4. MrFusion macrumors 6502a

    Joined:
    Jun 8, 2005
    Location:
    West-Europe
    #4
    I can try to answer.

    I am not sure how your datamodel is constructed, but this is how I have it.

    I have an entity called "Group", which has a "parent" (to one) and "children" (to many) relationship, with the inverse relationship set. To be clear, these two point to each other, it stays within this entity.
    I have other entities, which are subclasses of the Group entity.

    You could also move existing children into a parent node, by fetching them from the store.
    First try to do this in code.
    Drag and drop is a next step.
     

Share This Page