On 2023-03-07 04:05:19 +0000, rbowman wrote: > On Mon, 6 Mar 2023 21:55:37 -0500, Dino wrote: > > ne issue that was also correctly foreseen by some is that there's going > > to be a new request at every user key stroke. Known problem. JavaScript > > programmers use a trick called "debounceing" to be reasonably sure that > > the user is done typing before a request is issued: > > > > https://schier.co/blog/wait-for-user-to-stop-typing-using-javascript > > That could be annoying. My use case is address entry. When the user types
It can be. The delay is short but noticeable. A somewhat smarter strategy is to send each query as soon as the user hit the key but keep track of what you sent and received and discard responses for obsolete requests (This is necessary because if you first send "ma" and then "mas", the response to the first query might arrive after the response to the second query and you don't want to display "mansion" if the user already typed "mas".) hp -- _ | Peter J. Holzer | Story must make more sense than reality. |_|_) | | | | | h...@hjp.at | -- Charles Stross, "Creative writing __/ | http://www.hjp.at/ | challenge!"
signature.asc
Description: PGP signature
-- https://mail.python.org/mailman/listinfo/python-list