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: Ben Golding <email@hidden>
- Date: Wed, 20 Apr 2011 11:46:46 +1000
On 20/04/2011, at 01:09, Kyle Sluder wrote:
> On Apr 19, 2011, at 6:20 AM, Ben Golding <email@hidden> wrote:
>
>>
>> Sure, I'm using content to bind to an array controller bound to an array of pop-up button titles and selected index (though I'm picking up the selected object using [[arrayControlled selectedObjects] objectAtIndex:0]).
>>
>> I've also tried binding to contentValues which was unsuccessful too.
>
> It might help to be a bit more precise. Enumerate all the configured bindings on your popup button. I like to use a syntax like this:
>
> popupButton.content --(CapitalizeTransformer)--> [arrayController].arrangedObjects
I should have been more specific. What I have looks like:
popupButton.content -(Transformer)-> [arrayController].arrangedObjects
popupButton.selectedIndex --> [arrayController].selectionIndex
I have also tried:
popupButton.contentValues -(Transformer)-> [arrayController].arrangedObjects
popupButton.selectedIndex --> [arrayController].selectionIndex
In both cases, the transformer is passed an _NSControllerArrayProxy object which wasn't what I was hoping for; I had hoped for an NSString. I could probably dredge around in that object and find some methods to use but all the docs say "don't use undocumented methods/classes" so my gut reaction is to try another way.
Ben.
Attachment:
smime.p7s
Description: S/MIME cryptographic signature
_______________________________________________
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