Max,
Attached is an example I used at presentations in my region when 2.20 was released. Looking back at it, it is very similar to what you are trying to achieve. If you look near the end of the code, there is an entry you can uncomment to verify that trailing spaces is treated correctly.
As well as updating the list based on what you type, I change the style to indicate a good or a bad value.
As others have commented, be conscious of network traffic, and only have the action active where necessary.
Seb, Pierre-Nicolas: Go to google and type part of a search phrase into the search box and do nothing for 1 second, it will come back with a list of 10 top search expressions. That is similar to type of functionality I was aiming for in my example. It maybe that ON ACTION dialogtouched is not the best method to achieve something similar but it is what we have got. A variation of ON IDLE that is only triggered once would've been the preferred choice e.g.
ON IDLE 1 DONTREPEAT
-- if user doesn't input for 1 second, display a list of possibe values based on what they have keyed so far.
-- only does this once, if the user continues to do nothing don't trigger this block every second like ON IDLE 1 would
-- when the user does soemthing, then the timer can be reset.
CALL display_list()
Reuben