I do not think that this is possible from an automatic point of view. event handlers are activated when a specific event occurs inside an object. The fact that it does not even start in this launch does not mean that there is no execution path for it.
it is also possible to dynamically assign handlers at run time, so use in one situation fails.
eg.
button.onclick: = DefaultClickHandler;
button.onClick: = SpecialClickHandler;
Assuming click handlers match the signature of the onclick event, but you would not get compilation if the signature was incorrect.
however, you can probably find all the abandoned handlers by looking for all the methods that detect the method signature (Sender: TObject) and comparing its methods with the methods in .dfm (make sure you save it as text if you are working with an older version delphi), an antia not automatically linked will be suspicious in my book.
-
If you do not want to go along the cygwin path, you can load src and dfm into two TStirngLists and pull out the name / idents from each and generate a list with several loops and some string manipulations. my guess is about 20 minutes of work to get what you can live with.
Mikej
source share