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

Re: NSTreeController question


  • Subject: Re: NSTreeController question
  • From: email@hidden
  • Date: Wed, 25 May 2005 17:58:03 -0700 (PDT)
  • Importance: Normal

FROM : T Reaves
DATE : Thu May 26 02:23:32 2005

>Is this intended to be used where the children are of the same 
>type as the parent?  If I have a class Foo, and a class Bar, and Foo 
>has a collection of Bar, is an NSTreeController up to the task?  Or 
>am I better off using a custom controller?

Yes. You could use a common parent entity, but the tree controller needs
to know what relationship is used to traverse the tree. If you had Foo
that only defined Foo.children as a to-many relationship to Foo, then you
could use it as a parent for Bar and Baz, etc... and use a tree
controller.

But it sounds like you should just us an NSArrayController.

-Justin
 _______________________________________________
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

  • Prev by Date: Re: Function calling
  • Next by Date: Re: Function calling
  • Previous by thread: Re: NSTreeController question
  • Next by thread: Getting the default responder in the chain
  • Index(es):
    • Date
    • Thread