Posts by Sergey

TNotifyEvent debouncing in Delphi

August 24th, 2017 Posted by Embarcadero No Comment yet

Every developer who works with UI handles a lot of user input. And it’s not a rare situation that we don’t need to handle every incoming event because there might be just too many of them.

Consider this example, a user fills an email field on “Sign up” form in some application which works with a REST API. We want to validate entered email before a user actually will click “Submit” button. To do it, we make a call to hypothetical “/email/validate” REST endpoint and display validation status on the UI, which enables a user to adjust his input until he finishes working with the form.

Some people type really fast, so we don’t want to make a REST call for every entered character. Lots of APIs have request limits and in order not to exceed them it’s necessary to “throttle” events emitted by fast user typing.

(more…)