• 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 & NSTreeController question
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: CoreData & NSTreeController question


  • Subject: Re: CoreData & NSTreeController question
  • From: T Reaves <email@hidden>
  • Date: Fri, 13 May 2005 15:59:34 -0400


On May 13, 2005, at 3:34 PM, Jim Correia wrote:

On May 13, 2005, at 3:27 PM, T Reaves wrote:


The issue I have is that because the outline is bound to a controller of a particular type, when an instanec is added as a child of another instance, the new object appears twice in the outline; once as the child element of the instance added to, and once as a top level object itself. What I want to do is limit it to only being displayed once - at the level it was added at.

Would I use a predicate set in IB on the NSTreeController for this?


Yes. Look at

/Developer/Examples/CoreData/OutlineEdit

since it does exactly what you want. The predicate is "parent == nil" but of course may differ based on your model.

Jim



Perfect! I'd forgot to check the Examples directory. It's too bad Apple doesn't link the examples into the documentation within XCode.

    thanks.

_______________________________________________
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: CoreData & NSTreeController question
      • From: mmalcolm crawford <email@hidden>
References: 
 >CoreData & NSTreeController question (From: T Reaves <email@hidden>)
 >Re: CoreData & NSTreeController question (From: Jim Correia <email@hidden>)

  • Prev by Date: Re: long Tigers
  • Next by Date: Re: Display Keys-Values in Spotligh
  • Previous by thread: Re: CoreData & NSTreeController question
  • Next by thread: Re: CoreData & NSTreeController question
  • Index(es):
    • Date
    • Thread