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

RE: NSTreeController ChildKeyPath


  • Subject: RE: NSTreeController ChildKeyPath
  • From: Keith Blount <email@hidden>
  • Date: Fri, 29 Jul 2005 05:16:26 -0700 (PDT)

Hello,

You just need a BOOL instance variable such as BOOL
isLeaf, which is set to YES if you want the item to be
a leaf, and NO if it is a group. Then in the
NSTreeController's bindings, bind this variable to the
Child Key Path.

Not sure how this will help you find a specific object
though. For finding specific objects you will probably
need to write a recursive method that traverses the
tree to find what you are looking for.

Hope that is of some help.
Cheers,
Keith

--- ORIGINAL MESSAGE: ---

Can anyone explain in more detail than the apple
documentation how
the ChildKeyPath works for traversing a
NSTreeController?  I need to
find a specific object, and it would appear this is
how I do it.
Each of my objects implements items (they return nil
because every
object is a leaf, i.e. no children).

Thanks,

Ben Dunton



____________________________________________________
Start your day with Yahoo! - make it your home page
http://www.yahoo.com/r/hs

 _______________________________________________
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 ChildKeyPath
      • From: "Marcus S. Zarra" <email@hidden>
  • Prev by Date: Wrapping Command Line Tools
  • Next by Date: Re: NSTextView "Multiple fonts allowed" setting programatically
  • Previous by thread: NSTreeController ChildKeyPath
  • Next by thread: Re: NSTreeController ChildKeyPath
  • Index(es):
    • Date
    • Thread