• 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
NSTreeController, NSOutlineView + Core Data
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

NSTreeController, NSOutlineView + Core Data


  • Subject: NSTreeController, NSOutlineView + Core Data
  • From: Alex Reynolds <email@hidden>
  • Date: Wed, 5 Apr 2006 23:20:30 -0400

I have multiple entities in a Core Data model from which I would like to build a hierarchy in NSOutlineView.

From the root leaves, I have one set of data from one entity; two levels down, separate entities representing data of the type represented by each parent node, e.g.:

Type A
|---------> Data of Type A
|---------> Data of Type A
|
Type B
|---------> Data of Type B
|                |
|                |----------> Data of Subtype of B
|---------> Data of Type B
|                |
|                |----------> Data of Subtype of B
|
etc.

Since I can't hook up a single binding (i.e. one entity) to the NSOutlineView -- or I don't know how to build the above structure from a single binding -- I've subclassed NSTreeController and NSOutlineView so that I can try to build this kind of custom structure into an array which I feed into the NSTreeController, which I hope should in turn be displayed by NSOutlineView.

So I have a couple questions:

1. Is this a bad way to approach handling multiple Core Data entities with an NSOutlineView object? Is there an easier way?

2. Are there any code samples that provide a simple demonstration of how NSOutlineView and NSTreeController work together?

Thanks for any tips,

Regards,
Alex
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


  • Follow-Ups:
    • Re: NSTreeController, NSOutlineView + Core Data
      • From: Paul Forgey <email@hidden>
  • Prev by Date: Re: cross inclusion with fully qualified types in interface
  • Next by Date: Re: Predicates: Trying to filter against max()
  • Previous by thread: Re: cross inclusion with fully qualified types in interface
  • Next by thread: Re: NSTreeController, NSOutlineView + Core Data
  • Index(es):
    • Date
    • Thread