Hi,
If I have a TWebButton and the onclick opens a dialog form (asynchroneously), however fast I try to click on the button (multiple times) the dialog form will only open once.
If I have a TWebDBGrid (OnCellClick, OnDoubleClick): if I do the same (click multiple times very fast on a cell) the event is being called multiple times and I will end up with duplicate names (ID's) as the dialog form is being opened multiple times.
I tried:
- first thing in the eventhandler is to disconnect it in code
- reattach the event handler when the dialog form is being closed
I still have the issue: it seems that underlying javascript events are being buffered in some way ?
The only work around I found was to keep a variable, like
- FEventClicked = false
- first statement in the evenhandler: if FEventClick then exit;
- second statement in the eventhandler: FEventClick = true;
- when freeing the dialog form: FEventClick = false;