Quantcast
Channel: Delphi – The Wiert Corner – irregular stream of stuff
Viewing all articles
Browse latest Browse all 1445

Updating Actions (Don’t Do This) – Dave’s Development Blog

$
0
0

I remember fixing a high CPU toggling the Enabled property in an OnUpdate even handler on a TCustomAction descendant quite some time ago, but wasn’t completely sure of the exact cause.

My fix was to only set it once every clock tick (about every 20 milliseconds).

The best fix would have been not to toggle at all: just calculate the right result, then only set the Enabled property once: [WayBack] Updating Actions (Don’t Do This) – Dave’s Development Blog

–jeroen


Viewing all articles
Browse latest Browse all 1445

Trending Articles