{"id":2038,"date":"2008-11-13T23:32:42","date_gmt":"2008-11-14T02:32:42","guid":{"rendered":"http:\/\/www.hoogervorst.ca\/arthur\/?p=2038"},"modified":"2008-11-13T23:53:03","modified_gmt":"2008-11-14T02:53:03","slug":"retro-code","status":"publish","type":"post","link":"http:\/\/www.hoogervorst.ca\/arthur\/?p=2038","title":{"rendered":"Retro-Code"},"content":{"rendered":"<p><span class=\"dropcap\">I<\/span> was looking for <a href=\"http:\/\/www.hoogervorst.ca\/arthur\/?attachment_id=2039\" rel=\"attachment wp-att-2039\"><img decoding=\"async\" loading=\"lazy\" src=\"http:\/\/www.hoogervorst.ca\/arthur\/wp-content\/uploads\/2008\/11\/round_abo_ty-150x120.jpg\" alt=\"\" title=\"Custom Toolbars\" width=\"150\" height=\"120\" class=\"alignright size-thumbnail wp-image-2039\" srcset=\"http:\/\/www.hoogervorst.ca\/arthur\/wp-content\/uploads\/2008\/11\/round_abo_ty-150x120.jpg 150w, http:\/\/www.hoogervorst.ca\/arthur\/wp-content\/uploads\/2008\/11\/round_abo_ty-300x241.jpg 300w, http:\/\/www.hoogervorst.ca\/arthur\/wp-content\/uploads\/2008\/11\/round_abo_ty.jpg 646w\" sizes=\"(max-width: 150px) 100vw, 150px\" \/><\/a>older code through some older projects and I ended up looking at the code of RoundAbout, a Delphi project I headed with a German (Roland), an American (Marcos) and plenty of other contributors. I thought, I might just as well make this an opportunity to breathe new life into this specific category: There is some exciting and funny code in the project and I wouldn&#8217;t do the project good by not showing the effort to collectively create something good out of nothing.\n<\/p>\n<p>But first: In the early 2000s I ended up looking for an e-mail client for Windows. For years I had been using Eudora, but, I got a bit tired of looking at the ads that Qualcomm pushed upon users. I initially looked at <a href=\"http:\/\/phxmail.sourceforge.net\/\">Phoenix Mail<\/a>, an e-mailer initially programmed by Michael Haller which in turn was passed on to American Delphi developers. Via that mailing-list I discovered <a href=\"http:\/\/www.rr4u.de\/\">Roland&#8217;s excellent modernized branch<\/a> and, as any good open-source branch, I ended up branching his version into RoundAbout because we couldn&#8217;t agree on many issues: I believed in going more in-depth (technically speaking) while Roland was more or less adopting a wait-and-see, conservative approach. Both approaches had their successes, and both our branches had attracted a variety of Delphi luminaries and dignitaries (I&#8217;m looking at you Duntemann), including offers of help from the original Phoenix Mail branch. In 2004, RoundAbout was left for what it was and like many open-source projects, it died a silent dead. However, without doubt, its code continues to live on in the original branch(es) or is probably floating around on the Internets. I wouldn&#8217;t recommend people to try the e-mailer nowadays: it works fine but might look odd on Windows XP and higher.\n<\/p>\n<p>This brings me to the first piece of code I&#8217;d like to point at, which is the ability of adding or dynamically creating toolbars and toolbar buttons: It was heavily pushed by Marcos and it required so many code changes, that I ended up taking the challenge, provided that:\n<\/p>\n<p class=\"quote\">It is possible to create new toolbars and buttons: however, the maximum of toolbars should be 255, the maximum of total buttons (application wide) are 65,5xxx (the number that fits in a word).\n<\/p>\n<p>I mean, 65 thousand and some buttons should be enough for everybody, right?\n<\/p>\n<p><!--more--><\/p>\n<p>The main code of code clearing up existing entries (toolbars\/toolbar buttons) was encapsulated in a  <a href=\"http:\/\/roundabout.cvs.sourceforge.net\/viewvc\/roundabout\/Phoenix%20Main\/Main.pas?revision=1.54&#038;view=markup&#038;sortby=date\">inline procedure called<\/a>:\n<\/p>\n<pre>\n 8594   procedure UseThatGrenadeLauncher;<br \/>\n 8595   var l : integer;<br \/>\n 8596       p : TPopUpMenu;<br \/>\n 8597   begin<br \/>\n 8598     for l := FooBar.ControlCount - 1 downto 0 do<br \/>\n 8599     begin<br \/>\n 8600       \/\/ FireInTheHole!<br \/>\n 8601       if FooBar.Controls[l] is TToolBarButton97 then<br \/>\n 8602       begin<br \/>\n 8603         \/\/ Make sure that eventual attached menus are freed.<br \/>\n 8604         p := TToolBarButton97(FooBar.Controls[l]).DropDownMenu;<br \/>\n 8605         if Assigned(p) then<br \/>\n 8606         begin<br \/>\n 8607           p.Free;<br \/>\n 8608           TToolBarButton97(FooBar.Controls[l]).DropDownMenu := nil;<br \/>\n 8609         end;<br \/>\n 8610       end;<br \/>\n 8611       Foobar.Controls[l].Free;<br \/>\n 8612     end;<br \/>\n 8613   end;<br \/>\n<\/PRE><\/p>\n<p>Obviously, I was heavily into QuakeWorld then and when I was programming this, it was most likely late at night. It worked out, and surprisingly, the first code wasn't too buggy either.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>I was looking for older code through some older projects and I ended up looking at the code of RoundAbout, a Delphi project I headed with a German (Roland), an American (Marcos) and plenty of other contributors. I thought, I &hellip; <a href=\"http:\/\/www.hoogervorst.ca\/arthur\/?p=2038\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":[],"categories":[27],"tags":[146,579],"_links":{"self":[{"href":"http:\/\/www.hoogervorst.ca\/arthur\/index.php?rest_route=\/wp\/v2\/posts\/2038"}],"collection":[{"href":"http:\/\/www.hoogervorst.ca\/arthur\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/www.hoogervorst.ca\/arthur\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/www.hoogervorst.ca\/arthur\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"http:\/\/www.hoogervorst.ca\/arthur\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=2038"}],"version-history":[{"count":1,"href":"http:\/\/www.hoogervorst.ca\/arthur\/index.php?rest_route=\/wp\/v2\/posts\/2038\/revisions"}],"predecessor-version":[{"id":2040,"href":"http:\/\/www.hoogervorst.ca\/arthur\/index.php?rest_route=\/wp\/v2\/posts\/2038\/revisions\/2040"}],"wp:attachment":[{"href":"http:\/\/www.hoogervorst.ca\/arthur\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=2038"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/www.hoogervorst.ca\/arthur\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=2038"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/www.hoogervorst.ca\/arthur\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=2038"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}