• 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: coredata: building tree from Entities
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: coredata: building tree from Entities


  • Subject: Re: coredata: building tree from Entities
  • From: Quincey Morris <email@hidden>
  • Date: Thu, 30 Oct 2008 09:48:11 -0700

On Oct 30, 2008, at 08:39, Georg Seifert wrote:

once again a beginner question on coredata.

I want to display my data in a outlineview grouped one of the entities attributes.
my Data:
Elements (
	{"titel1", "name1"},
	{"titel1", "name2"},
	{"titel2", "name3"},
	{"titel2", "name4"},
	{"titel2", "name5"} )
the OutlineView should show:
titel1
	name1
	name2
titel2
	name3
	name4
	name5

Can I build it using fetched properties?

It's more an NSOutlineView question than a Core Data question.

For an outline view with bindings, you need a tree-structured hierarchy of individual objects, each of which (at least) implements the "children" method whose name you specify for the outline view in IB. If your titles and names are string attributes, that's not going to work.

You might be able to do it fairly easily using a data source for the outline view, instead of bindings, for the name/title column(s).

Or, create a hierarchy of stand-in objects and use bindings.

Or, redesign your Core Data model so that the parent/child relationships are explicit in the model.


_______________________________________________

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


References: 
 >coredata: building tree from Entities (From: Georg Seifert <email@hidden>)

  • Prev by Date: Re: Static text over an image
  • Next by Date: -[_NSZombie methodSignatureForSelector:] not working
  • Previous by thread: coredata: building tree from Entities
  • Next by thread: Image from font file
  • Index(es):
    • Date
    • Thread