Doesn't display anything means it doesn't show up anything from the array. I'll 
think about it. I just want to have a pre-determined list of items but I'd like 
the user to have the ability to add new items. That's why I chose the 
NSComboBox but I see one problem with it. If the user adds one item, that's 
only a string and it won't be a dictionary. I might have to use a datasource 
instead.

Thanks for the comments, Quincey.

-Laurent.
-- 
Laurent Daudelin
AIM/iChat/Skype:LaurentDaudelin                                 
http://www.nemesys-soft.com/
Logiciels Nemesys Software                                              
laur...@nemesys-soft.com

On Oct 7, 2010, at 13:05, Quincey Morris wrote:

> 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