Basile B.
« on: December 16, 2014, 10:59:04 am »
Hello, does anyone else has experienced some problems in ActionUpdate(), under the following conditions:
ActionUpdate event is constantly called:
Currently I'm forced to lock the method with a counter. Additional precision: - the event is created from a Form from a TAction List.
- the problem does not exist under Windows
- Locker is a CPU-registry-wide data (NativeInt).
TMyForm.Action Update(AAction: TBasicAction; var Handled: Boolean)
Begin
Handled := true;
if Locker > 0 then exit;
Inc(Locker)
try
//...updates: actionthis.enabled := true; actionthat.enabled := ...; and so on
finally
Dec(Locker);
end;
End;
Actually if I don't use this protection pattern, the application completly locks for a while...Has anyone else experienced the same ? LCL bug maybe ?
« Last Edit: December 16, 2014, 11:06:19 am by Basile B. »

Logged