There are many ways a user can trigger an action (TAction): keyboard shortcuts, toolbar button, popup menu button, etc. Can I get information about how this action was initiated?
I'm just thinking of implementing an activity log to figure out the most popular ways to use different functions in the GUI.
Update
I need to collect some statistics on how the user interacts with the application GUI.
It is not a good idea to create a separate action for each button just because you need to implement logging. Ulrich Gerhardt's answer seems appropriate. I can assign a TActionList.OnExecute event handler and write a log from one place.
delphi
Roman yankovsky
source share