Safe event hooking for Delphi IDE plugins revisited

Safe event hooking for Delphi IDE plugins revisited

A while ago I blogged about Safe event hooking for Delphi IDE plugins. I have used this method in GExperts as well as my Delphi IDE Explorer and it worked fine for both plugins.

Today I looked at the code again and didn’t like it very much. Yes, it works fine and there aren’t any apparent bugs, but it blatantly violates the DRY (don’t repeat yourself) principle. Back, when I wrote it, my goal was to get something working fast so I could use it for my main goal: Make GExperts and the IDE explorer coexist peacefully within the same Delphi instance, even though they both hook Screen.OnFormChange and Screen.OnControlChange. Today, my goal changed. It’s now: Improve the code.
http://blog.dummzeuch.de/2016/03/28/safe-event-hooking-for-delphi-ide-plugins-revisited/

Comments

Post a Comment