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: Joanna Carter <email@hidden>
- Date: Wed, 20 Apr 2011 09:21:40 +0100
Hi Ben
> Trouble is that what I'm trying to model really is an array of strings.
>
> To put this problem into context, what I'm trying to offer the user through the pop-up button is which character to use as a field separator when reading a CSV file. The value transformer is something that can recognise a string that isn't visible (TAB for example) and put some sort of visible representation in the button string. What I'm trying to do is to keep the strings unchanged in the content array and just change the presentation on the button so I don't have to translate to and from the printable representation.
I can easily add NSStrings to an NSArray, set that array as the Content Array of an NSArrayController and set the array controller as the Content of the NSPopupButton, with arrangedObjects as the Controller Key.
I think the problem is in the value transformer; could you post your code?
Joanna
--
Joanna Carter
Carter Consulting
_______________________________________________
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