{"id":189,"date":"2008-08-14T22:11:52","date_gmt":"2008-08-14T10:11:52","guid":{"rendered":"https:\/\/www.deltics.co.nz\/blog\/?p=189"},"modified":"2008-08-14T22:18:59","modified_gmt":"2008-08-14T10:18:59","slug":"multicast-bug-fix","status":"publish","type":"post","link":"https:\/\/www.deltics.co.nz\/blog\/posts\/189\/","title":{"rendered":"MultiCast &#8211; Bug Fix"},"content":{"rendered":"<span class=\"span-reading-time rt-reading-time\" style=\"display: block;\"><span class=\"rt-label rt-prefix\">[Estimated Reading Time: <\/span> <span class=\"rt-time\"> 2<\/span> <span class=\"rt-label rt-postfix\">minutes]<\/span><\/span><p>With apologies to those who have downloaded what I wrongly claimed was the &#8220;final&#8221; version a few days ago, I found an error in one of those last minute &#8220;improvements&#8221; I mentioned.\u00a0 I also took the opportunity to incorporate a couple of refinements that others suggested (thanks CR).<\/p>\n<p>A new version is now available for download and contains the following fixes and changes:<\/p>\n<p><!--more--><\/p>\n<p>1. Most importantly, I had realised that the <em>CheckReferences()<\/em> method would give false errors due to an error I introduced without testing &#8211; it was one of those: &#8220;this is so simple I can&#8217;t possibly have made a mistake&#8221; things.<\/p>\n<p>Shame on me.  \ud83d\ude41<\/p>\n<p>Now might not be the best time to mention that I plan on blogging about my testing framework at some point (I don&#8217;t call it a &#8220;Unit Testing&#8221; framework because it&#8217;s actually a bit more than that)<\/p>\n<p>2. The <strong>Enabled<\/strong> read\/write property is now read-only.\u00a0 To enable or disable an event use the newly added <strong>Enable<\/strong>\/<strong>Disable<\/strong> methods, so where you would previously have written:<\/p>\n<pre class=\"delphi\">  someEvent.Enabled := FALSE;\r\n  try\r\n     \/\/ Do something\r\n  finally\r\n    someEvent.Enabled := TRUE;\r\n  end;<\/pre>\n<p>now use:<\/p>\n<pre class=\"delphi\">  someEvent.Disable;\r\n  try\r\n     \/\/ Do something\r\n  finally\r\n    someEvent.Enable;\r\n  end;<\/pre>\n<p>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 &#8220;funky&#8221;.<\/p>\n<p>3. I also agreed with CR that the two <strong>IOn_Destroy<\/strong> interfaces were something of a mess (I wouldn&#8217;t have gone so far as to call them a &#8220;hack&#8221; 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;\u00a0 I always use the <strong>TOnDestroy<\/strong> class to add <strong>IOn_Destroy<\/strong> support to a class.<\/p>\n<p>Accordingly I have now removed the <strong>IOn_Destroy_<\/strong> interface and extended the <strong>IOn_Destroy<\/strong> interface to expose some additional methods of the encapsulated event (since the event itself is now not exposed directly).<\/p>\n<h3>Impact Analysis<\/h3>\n<p>With the possible exception of the change to the Enabled property, I don&#8217;t believe this should affect any code anyone may have written in the short time that the previous version was available.<\/p>\n<p>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&#8217;s just to say &#8220;Hi&#8221;.\u00a0 \ud83d\ude42<\/p>\n<p>The version containing these changes may be downloaded below.<\/p>\n<p>[dm]7[\/dm]<\/p>\n<h3>Meanwhile: Source Code Hosting<\/h3>\n<p>Whilst the downloads manager plugin that I&#8217;m using with my WordPress blog is very good, I am looking for a more practical solution to source code hosting.<\/p>\n<p>I&#8217;ve looked at googlecode and sourceforge and one or two others, and they all seem to use SVN.\u00a0 I personally don&#8217;t like SVN.\u00a0 What do other people in my situation do?\u00a0 i.e. they want a source code hosting solution but the tools they use don&#8217;t fit with the popular offerings.<\/p>\n<p>Do I just have to grit my teeth and learn to put up with SVN?<\/p>\n","protected":false},"excerpt":{"rendered":"<p><span class=\"span-reading-time rt-reading-time\" style=\"display: block;\"><span class=\"rt-label rt-prefix\">[Estimated Reading Time: <\/span> <span class=\"rt-time\"> 2<\/span> <span class=\"rt-label rt-postfix\">minutes]<\/span><\/span>With apologies to those who have downloaded what I wrongly claimed was the &#8220;final&#8221; version a few days ago, I found an error in one of those last minute &#8220;improvements&#8221; I mentioned.\u00a0 I also took the opportunity to incorporate a couple of refinements that others suggested (thanks CR). A new version is now available for [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_feature_clip_id":0,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":false,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2},"jetpack_post_was_ever_published":false},"categories":[4],"tags":[292,28,25,37,38],"class_list":["post-189","post","type-post","status-publish","format-standard","hentry","category-delphi","tag-delphi","tag-download","tag-multicast-events","tag-source-hosting","tag-svn"],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"","jetpack_shortlink":"https:\/\/wp.me\/p1TKYv-33","jetpack_sharing_enabled":true,"jetpack-related-posts":[],"_links":{"self":[{"href":"https:\/\/www.deltics.co.nz\/blog\/wp-json\/wp\/v2\/posts\/189","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.deltics.co.nz\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.deltics.co.nz\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.deltics.co.nz\/blog\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.deltics.co.nz\/blog\/wp-json\/wp\/v2\/comments?post=189"}],"version-history":[{"count":2,"href":"https:\/\/www.deltics.co.nz\/blog\/wp-json\/wp\/v2\/posts\/189\/revisions"}],"predecessor-version":[{"id":191,"href":"https:\/\/www.deltics.co.nz\/blog\/wp-json\/wp\/v2\/posts\/189\/revisions\/191"}],"wp:attachment":[{"href":"https:\/\/www.deltics.co.nz\/blog\/wp-json\/wp\/v2\/media?parent=189"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.deltics.co.nz\/blog\/wp-json\/wp\/v2\/categories?post=189"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.deltics.co.nz\/blog\/wp-json\/wp\/v2\/tags?post=189"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}