Re: NSTreeController question
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