Re: ArrayController vs Pop-up button vs Transformer -- three way tag team death match!
Re: ArrayController vs Pop-up button vs Transformer -- three way tag team death match!
- Subject: Re: ArrayController vs Pop-up button vs Transformer -- three way tag team death match!
- From: Ken Thomases <email@hidden>
- Date: Wed, 20 Apr 2011 03:41:50 -0500
On Apr 20, 2011, at 2:25 AM, Ben Golding wrote:
> On 20/04/2011, at 15:41, Ken Thomases wrote:
>
>> You can pretend the former case is more like the latter by using a model key path like "description" or even "self", although the latter case still tends to be more amenable to bindings.
>
> I've just tried using self and description on the contentValues binding and the array (an NSCFArray this time) is what's passed to the value transformer.
Hmm. That was so surprising that it prompted me to experiment. It seems that the NSPopUpButton bindings are very weird. Quite different from, for example, the NSTableColumn bindings.
The value transformer does indeed seem to get an array object or a proxy that mimics one, depending on whether you specify a model key path in the binding. I suppose you would transform the whole array, instead of transforming each individual string. That does work in my experiments.
I'd call it a bug, but there's probably little chance of it being changed now. File one, anyway, if you feel strongly enough.
Regards,
Ken
_______________________________________________
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