• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: NSComboBox bound to NSMutableArray of NSMutableDictionary with NSArrayController?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: NSComboBox bound to NSMutableArray of NSMutableDictionary with NSArrayController?


  • Subject: Re: NSComboBox bound to NSMutableArray of NSMutableDictionary with NSArrayController?
  • From: Quincey Morris <email@hidden>
  • Date: Thu, 7 Oct 2010 13:05:32 -0700

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 (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

  • Follow-Ups:
    • Re: NSComboBox bound to NSMutableArray of NSMutableDictionary with NSArrayController?
      • From: Laurent Daudelin <email@hidden>
References: 
 >NSComboBox bound to NSMutableArray of NSMutableDictionary with NSArrayController? (From: Laurent Daudelin <email@hidden>)

  • Prev by Date: NSComboBox bound to NSMutableArray of NSMutableDictionary with NSArrayController?
  • Next by Date: Re: Calling maincontroller
  • Previous by thread: NSComboBox bound to NSMutableArray of NSMutableDictionary with NSArrayController?
  • Next by thread: Re: NSComboBox bound to NSMutableArray of NSMutableDictionary with NSArrayController?
  • Index(es):
    • Date
    • Thread