There are a lot of ways how user can trigger an action (TAction) execution: shortcut keys, toolbar button, popup menu button etc. Is it possible to get information how that action has been triggered?
I’m just thinking about implementation of activity log to figure out the most popular ways to use different features in GUI.
update
I need to collect some stats about how an user interact with application GUI.
It’s not the best idea to create a separate action for every button just because you need to implement logging. Ulrich Gerhardt’s answer looks suitable. I can assign a handler to TActionList.OnExecute event and write log from one place.
Maybe you can use ActionComponent:
There is also TApplication.OnActionExecute, TActionList.OnExecute and probably more “hooks”.