On Nov 7, 2009, at 5:41 AM, Graham Cox wrote:


On 07/11/2009, at 7:19 AM, Carlo Caione wrote:

in an application I need to populate a popup button with at least twenty entries.
What is the correct place where I have to store labels?
Can a property list be a good idea or is it better to leave them in the .m file?


The obvious answer is to populate the menu in Interface Builder. Why can't you do that?

If the menu is dynamically populated then the title strings should be set up using NSLocalizedString or one of its cousins, so that the strings originally come from the .m file but are localizable via a suitable strings file.

Ok, but the problem is not so simple (I think). Actually I have to populate the popup menu and, according to the choice of the user on this popup, set a string in another text field. To do that I used an array of NSDictionary (stored in a .plist file) with two keys and two objects: the first one related to the label of the popup entry and the other one for the content of textfield.
Moreover I have just one language.
Do you think that it's better to use localization?

--
CC





_______________________________________________

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