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: Citizen <email@hidden>
- Date: Tue, 19 Apr 2011 09:12:58 +0100
On 19 Apr 2011, at 08:41, Ben Golding wrote:
> I am a bit stumped. I have an array controller which I have hooked up to a pop-up button and that works quite well. The members of the array are NSStrings but I would like to reformat them when they're displayed by the pop-up button. Seems fairly straightforward, I thought I'd just write a little transformer to do that.
>
> I plugged everything together and was surprised that that the transformer was raising an exception because it was being passed an NSObjectControllerProxy as its argument, not an NSString as I'd been expecting.
[snip]
> Is it possible to do this? I feel like I'm missing something obvious.
How about, instead of trying to change what you pass to the transformer; transform what you get. i.e transform the NSObjectControllerProxy into the desired output?
Hope that helps / works.
Dave
------
David Kennedy (http://www.zenopolis.com)
_______________________________________________
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