[squeak-dev] "find method" changes

Levente Uzonyi leves at elte.hu
Thu Mar 11 03:54:21 UTC 2010

On Wed, 10 Mar 2010, Chris Muller wrote:

> Michael, this is absolutely fantastic.  You seem to have read my mind
> with nearly every usability feature that you mentioned.  Nice code,
> too!
>> I suspect they all started with the simple aim of "Bring up a dialog with a
>> given title, and a list of items, and let me know which was picked", but
>> then incrementally added more features:
>> -Let the user see all options in the list easily.
>> -Allow them to use mouse to move to an entry and activate it (support direct
>> click [or double-click], and pressing an Accept button)
> Yes of course, and this is where many designers stop caring.  Argh!
>> -Allow use of the keyboard to incrementally filter out / disable entries as
>> the user types a substring. Allow backspace to undo characters.
> yes.
>> -Keep a matching item selected at all times while the filtering substring is
>> changed, and allow the arrow keys to change this selection.
> Yes.
>> -Allow <enter> and <cmd-s> to choose the selected item, and <esc> and
>> <cmd-l> to cancel the dialog without selection.
> Yes!
>> -Ensure that closing the window cancels the dialog without selection.
>> -Have a visible Accept and Cancel button to help new users navigate their
>> way around.
>> -Let me know that the dialog was cancelled.
> I love it.  May I assume an MIT license on this code?  If so, I would
> like to integrate this into the trunk, to replace ChooserTool.
> I do have a couple of questions.
>  - Is there a reason you chose to answer the index or 0 rather than
> the object selected or nil?  The only way this could possibly convey
> more information is if you have duplicate entries in the list, which
> seems very unlikely..  The cost is that the developer has to index
> back into some list, which may have originated from a non-Sequenceable
> collection, forcing him to keep create and remember transient one to
> index back into just to use it.

The implementation assumes that the list is a SequenceableCollection.

>  - I'll take the filtering the way it is, but since you are obviously
> one who cares about refined usability, I will tell you what my one
> additional usability idea..  Order the results so that left-matches
> are before mid-string matches.
> Thanks again for this work!
> - Chris

This new chooser is great. The only thing I don't like about it is that if 
I press enter when the list is empty, it cancels the selection. For 
example if I print this: ListChooser chooseFrom: #(foo bar baz)
and accidentally press v<enter> instead of b<enter>, the return value will 
be 0.


More information about the Squeak-dev mailing list