Atozed Forums
TIWEdit OnAsyncKeyUp - Printable Version

+- Atozed Forums (https://www.atozed.com/forums)
+-- Forum: Atozed Software Products (https://www.atozed.com/forums/forum-1.html)
+--- Forum: IntraWeb (https://www.atozed.com/forums/forum-3.html)
+---- Forum: English (https://www.atozed.com/forums/forum-16.html)
+----- Forum: IntraWeb General Discussion (https://www.atozed.com/forums/forum-4.html)
+----- Thread: TIWEdit OnAsyncKeyUp (/thread-2705.html)



TIWEdit OnAsyncKeyUp - JuergenS - 04-10-2022

Hi,

I noticed that TIWEdit's OnAsyncKeyUp event fires twice when I enter the first character!

IntraWeb 15.2.52


Regards
JuergenS


RE: TIWEdit OnAsyncKeyUp - Alexandre Machado - 04-12-2022

Are you sure? I can't recreate it with IW 15.2.53


RE: TIWEdit OnAsyncKeyUp - Alexandre Machado - 04-12-2022

BTW, always a good idea to set DelayKeyEvents to True in IWEdits and descendant classes. This will avoid that dozens of requests are sent in a short time to the server.


RE: TIWEdit OnAsyncKeyUp - JuergenS - 04-12-2022

You're right, it's OK in IW 15.2.53   [Image: wink.png]

But I would like to understand why only the first OnAsyncKeyUp event can generate dozens of requests, but all others not.

Is the DelayKeyEvents property intended for key debouncing?

Would you like me to ask ATOZED a very basic question?


RE: TIWEdit OnAsyncKeyUp - Alexandre Machado - 04-12-2022

Hum... we fixed something regarding to multiple events firing, but it was fixed in 15.2.52...

Yes, the DelayKeyEvents property is exactly a debouncing mechanism. Instead of firing continously for each keypress/keyup/keydown event, a single event is triggered when there is a small pause in typing. This is overall a much better way of writing web applications (Especially because there is no guarantee that when you generate hundreds of almost simultaneous requests, they will be received and processed by the web server in the same order as they were generated)

Regarding your question, yes, shoot


RE: TIWEdit OnAsyncKeyUp - JuergenS - 04-13-2022

I've created a new thread "Intraweb documentation"