On 20/04/2011, at 01:09, Kyle Sluder wrote:

> On Apr 19, 2011, at 6:20 AM, Ben Golding <b...@object-craft.com.au> 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 (Cocoa-dev@lists.apple.com)

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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to