Re: help with linking combo boxes
Re: help with linking combo boxes
- Subject: Re: help with linking combo boxes
- From: One Only <email@hidden>
- Date: Tue, 10 Aug 2010 10:26:25 +0530
On Aug 9, 2010, at 10:52 AM, Quincey Morris wrote:
> On Aug 8, 2010, at 21:08, Rounak Jain wrote:
>
>> I have an array called "Products". It has some product names which are saved in a plist file. More Products are added to it through the combo box (named Product) and they too get saved in the plist file automatically.
>>
>> Now I want to create a second Combo Box (named Brand) and a third Combo Box (named Size).
>>
>> The idea is this:
>>
>> Depending on the Product selected in the Product Combo Box, the Brand Combo Box must display a list of Brands for the user to select for that Product. Each Product will have many different brands. This means each Product will have its own array of Brands. Also, when a user types in a new Brand instead of using the existing ones, the new Brand should also be added in the array of Brands for that particular Product.
>>
>> Finally, each Brand will have its own array of Sizes just like each Product had its own array of Brands.
>>
>> Please guide me on how I should do this.
>
> You probably shouldn't even try.
> Despite superficial appearances, NSComboBox is a kind of text field, *not* a kind of menu. If the intent is to choose an object from a list of objects, NSComboBox is definitely not the way to go about it. Only use NSComboBox where you want text entry, but also want to accelerate the text entry by providing several pre-determined strings. Otherwise, use a menu or a NSPopUpButton instead.
>
>
Hi Quincey,
Thanks for the reply. It seems I did not make myself clear. I did write that
>> the Brand Combo Box must display a list of Brands for the user to select for that Product.
but i also wrote
>> . Also, when a user types in a new Brand instead of using the existing ones, the new Brand should also be added in the array of Brands for that particular Product.
>
So basically, i was only interested in the auto-complete (setComplete: method) of comboBox when I wrote the first sentence.
But as you can see in the second sentence, I want the user to type in new Brands so that they are also available for auto-completion the next time. So I hope ComboBox is the right choice. Please guide me now.
Regards,
Rounak Jain_______________________________________________
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