• 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: Laurent Daudelin <email@hidden>
  • Date: Thu, 7 Oct 2010 15:14:38 -0700

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              				email@hidden

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 (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: Quincey Morris <email@hidden>
References: 
 >NSComboBox bound to NSMutableArray of NSMutableDictionary with NSArrayController? (From: Laurent Daudelin <email@hidden>)
 >Re: NSComboBox bound to NSMutableArray of NSMutableDictionary with NSArrayController? (From: Quincey Morris <email@hidden>)

  • Prev by Date: Any way for a managed object to get at its document object?
  • Next by Date: Re: NSComboBox bound to NSMutableArray of NSMutableDictionary with NSArrayController?
  • Previous by thread: Re: NSComboBox bound to NSMutableArray of NSMutableDictionary with NSArrayController?
  • Next by thread: Re: NSComboBox bound to NSMutableArray of NSMutableDictionary with NSArrayController?
  • Index(es):
    • Date
    • Thread