MultiCast – Bug Fix

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:

Multicast Events – Part 3

So far we’ve seen a multicast event implementation in (fairly limited) action, and dissected the core of it’s implementation, which was a fairly dry affair. I also demonstrated a flaw in the initial implementation – a susceptibility to objects adding handlers to events but not removing them when being destroyed.  Before the .NET crowd get all smug, we should note that the relationship between an event source and it’s listeners is potentially problematic, in .NET also. Fortunately I devised a solution to the problem in my framework.  The solution – rather neatly – was itself provided by a multicast event.

Multicast Events – Part 2

Having covered some of the basic use of multicast events, in this second post I shall start to build the implementation.  In this first iteration we will provide the basics of a multicast event – managing and calling multiple handlers and the ability to enable and disable an event. The test project used in the previous video demonstration may also now be downloaded for you to experiment with if you wish.

Multicast Events – Part 1

I remember one of the things that got me excited when I first read about the as-then new fangled C# and .NET stuff coming out of Microsoft was the idea that a single event could have multiple handlers. Cutting a long and irrelevant story short, my interest in .NET waned, although my interest in multicast events did not.  For a long time I was resigned to having to do without them, but then realised that this was a self imposed penury. So I got out my jail breaking toolkit (Delphi) and set about tearing down the walls of my prison.  And here’s how I did it…