Re: A TableView Binding question
Re: A TableView Binding question
- Subject: Re: A TableView Binding question
- From: Mike Abdullah <email@hidden>
- Date: Wed, 23 Feb 2011 12:09:19 +0000
>
>> I believe something is missing in the visual description in IB. when you bind against the arrangedObjects of the ArrayController, you actually indirectly specify that the array controller instantiates some Enumerator (Iterator) and the Model Key Path is applied to that enumerator. But what key-path do you ask from enumerator to bring back itself?.
>
> It is a little funky, because IB shows the binding textually as ArrayController.arrangedObjects.x.y.x, but there's no actual key path like that. (An array property is illegal in the middle of a key path.)
That's not strictly true. Arrays are just fine in key paths when used purely for KVC. Something like this:
[myArray valueForKey:@"name"]
will return the @"name" value of all objects in the array. The problem arises if you want to observe such a keypath, because an array itself cannot be observed._______________________________________________
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