NSComboBox

2018-07-25 Thread Casey McDermott
Apple's instructions for combo boxes say: "Note that while you can construct your NSComboBox so that users are restricted to only selecting items from the combo box’s pop-up list, this isn’t the combo box’s normal behavior." For our use, we definitely want to restrict NSComboBox to only accep

Re: NSComboBox

2018-07-25 Thread John Harte
> On Jul 25, 2018, at 12:45 PM, Casey McDermott wrote: > > Apple's instructions for combo boxes say: "Note that while you can construct > your NSComboBox > so that users are restricted to only selecting items from the combo box’s > pop-up list, > this isn’t the combo box’s normal behavior."

Re: NSComboBox

2018-07-25 Thread Jens Alfke
> On Jul 25, 2018, at 10:45 AM, Casey McDermott wrote: > > The goal is to auto-fill an account from what they type, and ignore typing if > not a match. That sounds like the regular behavior of NSPopUpButton: after clicking to pop up the menu, you can type-select items from it. (Although it

Re: NSComboBox

2018-07-25 Thread Rob Petrovec
I was going to suggest the same thing. NSPopUpButton should do what you want. —Rob > On Jul 25, 2018, at 12:51 PM, Jens Alfke wrote: > > > >> On Jul 25, 2018, at 10:45 AM, Casey McDermott wrote: >> >> The goal is to auto-fill an account from what they type, and ignore typing >> if not a

Re: NSComboBox

2018-07-25 Thread Casey McDermott
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

Re: NSComboBox

2018-07-25 Thread Keary Suska
NSComboBox is just a suped-up NSTextField, so you can some sort of validation so you can prevent the user from exiting the field if they don’t enter an acceptable value. The most basic approach is delegation and doing the check in -control:textShouldEndEditing: HTH, Keary Suska Esoteritech, I

Re: NSComboBox

2018-07-25 Thread Sandor Szatmari
I have done stuff like this just using NSTextField. You can connect delegate methods to supply the array of suitable strings to select from that match the ‘prefix’ the user types in. For every character the user types I recalculate the array of completions. You can filter a very long list of

Re: NSComboBox

2018-07-25 Thread Quincey Morris
On Jul 25, 2018, at 15:40 , Casey McDermott 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

Re: NSComboBox

2018-07-25 Thread Casey McDermott
We have a 1/2 decent version working right now based on NSTextField. It shows a scrolling table with a NSWindowController, and selects from the table (and beeps if not there). It also has a NSPopUpButton on the side to use as an additional option (handy for short lists or if the user is already

Re: NSComboBox

2018-07-25 Thread Casey McDermott
>> Or does the user need to scan the list of near-matches for some reason? Yes, exactly. When you have 20K customer records, you don't remember how each was entered, or how spelled. You may need to type a letter or 2 and then scroll the list. It may take a few tries: Smith Company? Smyth Compa

Re: NSComboBox

2018-07-25 Thread Richard Charles
> On Jul 25, 2018, at 6:18 PM, Casey McDermott wrote: > > One big beef I have is that it's not possible to step into Cocoa source, > unlike PowerPlant > or MFC. It makes it much harder to understand what's going on inside Cocoa. Check out the Cocotron source. Sometimes you can gain insight i