type ahead search and typing speed

Devin Asay devin_asay at byu.edu
Fri Jun 29 09:17:45 CDT 2007


On Jun 28, 2007, at 6:27 PM, Jim Ault wrote:

> Without looking, I would say that you might be in the category of  
> showing
> the match in a field behind/above the entry field, thus the user  
> selection
> remains in the typing mode and the lookup merely updates the viz  
> field with
> the closest match.
>
> How do you handle backspacing by the typist?

I simply delete the hilited portion of the name then pass it through  
the rawKeyUp handler.
>
> What if the typist thinks 'Ander" is good enough, then decides that  
> another
> char or two is required after seeing the match string filled in?

They can just hit tab or return and the name is chosen.
>
> Some programs show the choices in a dropDown menu and only do the  
> complete
> if the user chooses, let say, down arrow then tab key (like Excel)
>
> Are you showing all choices or just one that is the closest?

I show all choices in a separate field that "pops up" beneath the  
entry field. I had tried combo boxes but that was a mess that didn't  
do the selection and scrolling the way I wanted.

Thanks for the feedback, Jim.

Devin
>
>
> On 6/28/07 5:02 PM, "Devin Asay" <devin_asay at byu.edu> wrote:
>
>> Hi all,
>>
>> I have looked at this one until I'm cross-eyed, and I can't figure
>> out the problem.
>>
>> I am working on a program in which there are a couple of fields that
>> need to be filled in with user names. I keep a list of users in a
>> separate field. With some help from some of you here, I have
>> implemented a "type-ahead", auto-completion search that searches the
>> list of names with each keystroke, and auto-completes the entry field
>> if it finds that the string I have typed matches the beginning of one
>> of the names in the list. The rest of the matched name, the part I
>> haven't typed yet is added to the field, but remains selected. If I
>> hit return or tab, the matched name is left in the field. It's a
>> common feature, you see it in web browser URL fields, for example.
>>
>> It all works fairly well, except for one big problem. If the user
>> types very rapidly, after 2 or 3 characters typed, and a name is
>> matched, the insertion point jumps to the end of the field, *after*
>> the selected auto-completed text, then characters are entered at the
>> end of the field, instead of staying at the original insertion point.
>>
>> I'm afraid I'm not explaining it very well, but if anyone has a
>> couple of minutes and a pair of fresh eyeballs, would you mind
>> looking at:
>>
>> go stack URL "http://asay.byu.edu/typeAheadSearch.rev"
>>
>> Just start typing, say, my name, starting with the last name. You'll
>> see the list pop up and it will start to match "A" names. As long as
>> you type slowly you're fine. But as soon as you start typing fast--
>> try "anderson", for example--you'll see the problem I'm running into.
>>
>> This example stack leaves out some of the details of key handling,
>> but demonstrates the problem.
>>
>> I would appreciate any suggestions, and I'll be happy to share the
>> completed code with anyone who's interested.
>>
>> Regards,
>>
>> Devin
>>
>> Devin Asay
>> Humanities Technology and Research Support Center
>> Brigham Young University
>>
>> _______________________________________________
>> use-revolution mailing list
>> use-revolution at lists.runrev.com
>> Please visit this url to subscribe, unsubscribe and manage your  
>> subscription
>> preferences:
>> http://lists.runrev.com/mailman/listinfo/use-revolution
>
>
> _______________________________________________
> use-revolution mailing list
> use-revolution at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your  
> subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-revolution
>

Devin Asay
Humanities Technology and Research Support Center
Brigham Young University




More information about the use-livecode mailing list