Safe event hooking and unhooking (for Delphi IDE plugins)

 Delphi, GExperts  Comments Off on Safe event hooking and unhooking (for Delphi IDE plugins)
Oct 122015
 

In the comments to my Google+ post announcing my blog post on Hacking the Delphi 10 Project Options dialog Ondrej Kelle said:

If two or more plugins hijack the same global event handler then they must restore the previous (from their point of view) handler in reverse order, however this is not guaranteed and therefore this technique is likely to cause trouble.

and

API should be written, safe for plugins to use instead of the event handlers

to which Heinz Toskano added

This scenario remembers me when I wrote interrupt handlers for DOS. The civilized way was to hook and return the original handler, except when you replace the interrupt, in that case you was obliged to expose the original interface, just to not broke something else. Something similar must be done with IDE plugins, otherwise it will become bad coding.

I did a quick Google search but found no existing standard so I decided to simply describe one and publish it in the hope that others will find it useful and adhere to it.

NOTE:
I have moved the code and description to it’s own static page. I will improve it as I go along and blog about these improvements.

I post a link to this article on Google+. If you want to leave any comments, use this post.

 Posted by on 2015-10-12 at 21:50

How to disable update checking in TortoiseSVN?

 TortoiseSVN, Windows  Comments Off on How to disable update checking in TortoiseSVN?
Oct 122015
 

The latest 1.9.x versions of TortoiseSVN no longer support Windows XP (1.8.12 was the last one that did). Since some of the computers I work with are stuck with XP there isn’t much sense in having it check for updates automatically.

Older versions of TortoiseSVN used to have a check box on the settings “General” page, but that apparently was removed later. Now, it is on the “Advanced” page and called “VersionCheck”. Setting it to “false” disables the check.

TortoiseSVN Settings Advanced VersionCheck

 Posted by on 2015-10-12 at 10:07