Re: Stuck on NSTreeController bindings
Re: Stuck on NSTreeController bindings
- Subject: Re: Stuck on NSTreeController bindings
- From: Jenny M <email@hidden>
- Date: Wed, 24 Feb 2010 12:01:43 -0800
Hi Mark,
Thanks so much for the tip, unfortunately that's not the case. The Delta's
parent/children relationships point to fellow Deltas. It has a different
relationship (a "beta") that points to the beta. The entities aren't
inherited from one another, they're just chained together. Each Alpha has a
Beta and each Beta has multiple Deltas, but not as parent/children. The
Deltas have parent/children of each other - those are the entities I'm
trying to display in an outline view.
My confusion comes from where to set the set of Deltas. I know the currently
selected Alpha, so I should be able to use that to chain down to the Deltas.
But every Tree Controller example I've seen just uses the predicate to
display ALL the objects of an entity... so I'm trying to set it in the
bindings and coming up empty... :/
Jenny
On Wed, Feb 24, 2010 at 11:16 AM, Mark Townsend <email@hidden>wrote:
> Jenny,
>
> I think what you want is to set the Entity on the NSTreeController to be
> the Alpha entity, not Delta.
>
> The predicate 'parent == nil' will only give you back Delta objects where
> parent == nil. From what you've said, this will never be true as the Alpha
> objects are your top level objects.
>
> Alpha (parent == nil)
> |
> |->Beta (parent == Alpha)
> |
> |->Delta (parent == Beta)
> |->Delta (parent == Beta)
>
> ---
> Mark Townsend
> http://www.markltownsend.com
>
>
> On Wed, Feb 17, 2010 at 7:38 PM, Jenny M <email@hidden> wrote:
>
>> Sorry, realizing that the object chain isn't quite right. The Alpha-
>> Beta relationship is one to one, NOT many to one. Each alpha has one
>> beta, and one beta has multiple deltas. (I have multiple alpha
>> objects, hence my initial comment of multiple, but the relationship is
>> one-to-one.)
>>
>>
>> On Feb 17, 7:22 pm, Jenny M <email@hidden> wrote:
>> > My objects are chained like:
>> > Alpha (multiple) -> Beta (one) -> Delta (multiple) (delta has
>> > references to itself via parent and children relationships)
>> _______________________________________________
>>
>> 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
>>
>
>
_______________________________________________
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