With apologies to those who have downloaded what I wrongly claimed was the “final” version a few days ago, I found an error in one of those last minute “improvements” I mentioned. I also took the opportunity to incorporate a couple of refinements that others suggested (thanks CR).
A new version is now available for download and contains the following fixes and changes:
1. Most importantly, I had realised that the CheckReferences() method would give false errors due to an error I introduced without testing – it was one of those: “this is so simple I can’t possibly have made a mistake” things.
Shame on me. 🙁
Now might not be the best time to mention that I plan on blogging about my testing framework at some point (I don’t call it a “Unit Testing” framework because it’s actually a bit more than that)
2. The Enabled read/write property is now read-only. To enable or disable an event use the newly added Enable/Disable methods, so where you would previously have written:
someEvent.Enabled := FALSE; try // Do something finally someEvent.Enabled := TRUE; end;
someEvent.Disable; try // Do something finally someEvent.Enable; end;
Originally I was aiming to keep the number of methods on a multicast event to a minimum, but I agreed with CR that this way of controlling the enabled state of an event was a bit “funky”.
3. I also agreed with CR that the two IOn_Destroy interfaces were something of a mess (I wouldn’t have gone so far as to call them a “hack” though! lol) and I realised that the problem that the separation into two interfaces had solved no longer applied in that no longer ever implement the interface directly; I always use the TOnDestroy class to add IOn_Destroy support to a class.
Accordingly I have now removed the IOn_Destroy_ interface and extended the IOn_Destroy interface to expose some additional methods of the encapsulated event (since the event itself is now not exposed directly).
With the possible exception of the change to the Enabled property, I don’t believe this should affect any code anyone may have written in the short time that the previous version was available.
And I would be very interested to here from anyone that has taken a look and is considering perhaps using the code in their projects, even if it’s just to say “Hi”. 🙂
The version containing these changes may be downloaded below.
Meanwhile: Source Code Hosting
Whilst the downloads manager plugin that I’m using with my WordPress blog is very good, I am looking for a more practical solution to source code hosting.
I’ve looked at googlecode and sourceforge and one or two others, and they all seem to use SVN. I personally don’t like SVN. What do other people in my situation do? i.e. they want a source code hosting solution but the tools they use don’t fit with the popular offerings.
Do I just have to grit my teeth and learn to put up with SVN?