• 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
Re: Displaying multiple core data relationships in NSOutlineView
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Displaying multiple core data relationships in NSOutlineView


  • Subject: Re: Displaying multiple core data relationships in NSOutlineView
  • From: Steve Steinitz <email@hidden>
  • Date: Sat, 17 Jan 2009 12:58:22 +1100

Hi Rick,

On 16/1/09, you wrote:

The design I'm trying to achieve is analogous to the way Xcode displays a "Targets" group and a "Bookmarks" group in the same outline view. If Core Data was used for this (and I don't know if it was), it seems clear that Targets and Bookmarks would be modeled as separate to- many relationships and entities, and yet they are nicely displayed in the same outline view.

I had to do something a bit more complex than what you want to do: I wanted to summarize results of large numbers of objects into an outline view for a report. In the end I had to create my own hierarchy of summary objects and display them -- which makes sense now but was frustrating realizing that I wouldn't be able to do it with judicious filtering and @summing the raw Core Data objects.


You could do the same but your case may be simpler. One possibility would be to make your entities in question descend from a single super class. That super class would only need the outline stuff (parent, children, isLeaf...) and whatever you want to display in the outline, perhaps 'name' (note: avoid calling an attribute 'description' -- binding issues...). Then, I think, you could hack a way to show the whole lot by binding your outline to the super class.

Cheers,

Steve

_______________________________________________

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: Displaying multiple core data relationships in NSOutlineView
      • From: Rick Hoge <email@hidden>
  • Prev by Date: Re: How to manage a separate data file while saving an NSPersistentDocument or during schema migration
  • Next by Date: Re: How to manage a separate data file while saving an NSPersistentDocument or during schema migration
  • Previous by thread: Re: Displaying multiple core data relationships in NSOutlineView
  • Next by thread: Re: Displaying multiple core data relationships in NSOutlineView
  • Index(es):
    • Date
    • Thread