On Oct 7, 2010, at 12:32, Laurent Daudelin wrote:

> My NSMutableDictionary keys are Name and Service. I bound the 
> NSArrayController to my NSMutableArray ivar. I then set my NSComboBox content 
> to NSArrayController.arrangedObjects and NSComboBox content values to 
> NSArrayController.arrangedObjects.Name but the NSComboBox doesn't display 
> anything and I don't get any error in the console.
> 
> So, can I provide an array of NSMutableDictionary or does it have to be an 
> array of NSString?

What does "doesn't display anything" mean? Are you saying that the text field 
portion of the combo box has nothing in it, or that the popup list isn't 
populated with anything, or both?

You need to find out whether the problem is in NSComboBox, the bindings, 
NSArrayController or KVO compliance. The easiest way to solve this is to break 
it down. Try (temporarily) creating a table view that display the strings in 
NSArrayController.arrangedObjects.Name, for example. Or try binding your array 
controller to a simple array of strings, leaving contentValues unbound 
initially.

Incidentally, I just want to check that you're aware that a combo box isn't 
going to function like a menu? It's not going to provide a way to *choose* one 
of the dictionaries from your array.


_______________________________________________

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