Re: NSComboBox
Re: NSComboBox
- Subject: Re: NSComboBox
- From: Quincey Morris <email@hidden>
- Date: Wed, 25 Jul 2018 16:55:17 -0700
On Jul 25, 2018, at 15:40 , Casey McDermott <email@hidden> wrote:
>
> I forgot to mention that the lists may contain 10,000s of items. Maybe
> 100,000s.
> Typing to select from NSPopUpButton works OK for short lists. I just made a
> test
> popup with 300 items and it's already awkward. 10K would be absurd.
>
> These are business records, and users may data enter hundreds a day. They
> want
> to tab, type a few letters to select a customer, tab to the next field, type
> a bit to
> select an inventory item, etc. Type a customer that doesn't exist and it
> should beep
> and ignore the keystrokes. If they need to enter a new customer, it's a
> right-click,
> then a panel to enter more than just the name.
>
> Our current interface does use popup buttons for some things, but people
> complain
> about them. They don't want to take hands off keyboard. We plan to convert
> those
> to combo boxes so it can be completely mouseless.
If that’s your use case, there’s something else gong on at the heart of this.
What value — if there are tens of thousands of items — is there in popping
anything up at all, whether it’s a combo-box-style popup or a menu-style popup?
It seems that you should just validate the text field every stroke, and provide
the rest of the field as soon as what is typed becomes unique. Or does the user
need to scan the list of near-matches for some reason?
Another approach to this might be to be something like autocomplete, but where
you don’t start offering autocompletions until enough text has been entered to
limit the possibilities to a manageable number of choices. Text fields have
built-in support for autocomplete, although IIRC it gets a bit harder if the
completions are context sensitive — if typing more characters changes the list
of possibilities, rather than just limiting it. (Xcode’s autocompletions are
content sensitive in this sense, but Xcode has its own implementation unrelated
to NSTextField’s.)
Or, use a table view next to the text field, and programmatically scroll to the
area of the list that matches what the user has typed so far. NSTableView is
essentially optimized for displaying small fragments of huge lists, so it might
be better than trying to stuff all those entries in a combo box.
_______________________________________________
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