• 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:42:37 -0700

On Oct 7, 2010, at 15:30, Quincey Morris wrote:

> On Oct 7, 2010, at 15:14, Laurent Daudelin wrote:
>
>> 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.
>
> You could certainly bind the combo box's "value" binding to a string property in your data model, whose setter created a new dictionary when necessary. I'm not certain, though, how you'd be sure the user typed a new "Name" for the purpose of creating a new dictionary or just mistyped an existing one.
>
> Alternatively, use a pop up menu instead, with a "New XXX..." entry as well as the existing names. That's a more traditional way of doing it, which has the benefit of discoverability for the creation function (unlike the combo box solution).

Yeah, perhaps that's what I will do. Thanks, Quincey.

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

_______________________________________________

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

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>)
 >Re: 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: Re: Any way for a managed object to get at its document object?
  • Next by Date: Re: Documentation Hard Copy?
  • Previous by thread: Re: NSComboBox bound to NSMutableArray of NSMutableDictionary with NSArrayController?
  • Next by thread: Any way for a managed object to get at its document object?
  • Index(es):
    • Date
    • Thread