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.
Involuntary termination. Voluntary termination. Wrongful termination. End of a work contract or temporary employment.
Getting fired means that an employee's job is terminated for reasons such as poor work performance or unethical behavior such as stealing company equipment. However, an employer can fire workers without any valid reason if they're at-will employees.
Maybe you can use ActionComponent:
Use ActionComponent to discern which client component caused this action to execute. For example, examine ActionComponent from an OnExecute event handler if you need to know what user action triggered this action.
When the user clicks a client control, that client sets ActionComponent before calling the action's Execute method. After the action executes, the action resets ActionComponent to nil (Delphi) or NULL (C++).
There is also TApplication.OnActionExecute, TActionList.OnExecute and probably more "hooks".
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With