I have a NSPopUpButton that I want to use to select the text encoding for opening a file.
I already have some ideas how to implement this, but as I'm starting to learn Objective-C and Cocoa I'm almost sure that there is a better way to accomplish what i want.
I need to have a NSString with the name of the encoding and an associated NSStringEncoding value.
I have thought creating a class representing an encoding (name and value) and have a NSArray with objects of this type and then populate the NSPopUpButton with the contents of the array, but I think that there should be a better way.
I'm not very familiar with the NSDictionary class but I suspect that should make things easier.
Can someone give me a hint on this?