<?xml version="1.0" encoding="utf-8"?>
<rss xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:trackback="http://madskills.com/public/xml/rss/module/trackback/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:pingback="http://madskills.com/public/xml/rss/module/pingback/" version="2.0">
  <channel>
    <title>Dan Miser - Delphi</title>
    <link>http://www.distribucon.com/blog/</link>
    <description>Thoughts from Dan Miser</description>
    <language>en-us</language>
    <copyright>Dan Miser</copyright>
    <lastBuildDate>Wed, 22 Apr 2009 18:29:54 GMT</lastBuildDate>
    <generator>newtelligence dasBlog 2.3.9074.18820</generator>
    <managingEditor>dmiser@distribucon.com</managingEditor>
    <webMaster>dmiser@distribucon.com</webMaster>
    <item>
      <trackback:ping>http://www.distribucon.com/blog/Trackback.aspx?guid=c8755312-f231-4981-8332-07422a11622a</trackback:ping>
      <pingback:server>http://www.distribucon.com/blog/pingback.aspx</pingback:server>
      <pingback:target>http://www.distribucon.com/blog/PermaLink,guid,c8755312-f231-4981-8332-07422a11622a.aspx</pingback:target>
      <dc:creator>Dan Miser</dc:creator>
      <wfw:comment>http://www.distribucon.com/blog/CommentView,guid,c8755312-f231-4981-8332-07422a11622a.aspx</wfw:comment>
      <wfw:commentRss>http://www.distribucon.com/blog/SyndicationService.asmx/GetEntryCommentsRss?guid=c8755312-f231-4981-8332-07422a11622a</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">Are you looking for a strong developer/architect
with a serious passion for all things technical and a unique blend of experience?
If so, feel free to <a href="mailto:dmiser@distribucon.com">email me</a>. My main
focus over the past couple of years has been on things ALT.NET-ish (e.g. ASP.NET MVC,
NHibernate, Spring.NET, etc.) while I have delved into a variety of other technologies
as well (e.g. Mindscape LightSpeed, LINQ, Dynamic Data, Delphi, etc.). If you know
of an opening - contract or full-time - please keep me in mind. I'd prefer to remain
in the Milwaukee area, but occasional travel wouldn't be the end of the world. 
<p />
Until the next technical post here, take care and thanks in advance.<img width="0" height="0" src="http://www.distribucon.com/blog/aggbug.ashx?id=c8755312-f231-4981-8332-07422a11622a" /></body>
      <title>Looking for work</title>
      <guid isPermaLink="false">http://www.distribucon.com/blog/PermaLink,guid,c8755312-f231-4981-8332-07422a11622a.aspx</guid>
      <link>http://www.distribucon.com/blog/LookingForWork.aspx</link>
      <pubDate>Wed, 22 Apr 2009 18:29:54 GMT</pubDate>
      <description>Are you looking for a strong developer/architect with a serious passion for all things technical and a unique blend of experience? If so, feel free to &lt;a href="mailto:dmiser@distribucon.com"&gt;email
me&lt;/a&gt;. My main focus over the past couple of years has been on things ALT.NET-ish
(e.g. ASP.NET MVC, NHibernate, Spring.NET, etc.) while I have delved into a variety
of other technologies as well (e.g. Mindscape LightSpeed, LINQ, Dynamic Data, Delphi,
etc.). If you know of an opening - contract or full-time - please keep me in mind.
I'd prefer to remain in the Milwaukee area, but occasional travel wouldn't be the
end of the world. 
&lt;p /&gt;
Until the next technical post here, take care and thanks in advance.&lt;img width="0" height="0" src="http://www.distribucon.com/blog/aggbug.ashx?id=c8755312-f231-4981-8332-07422a11622a" /&gt;</description>
      <comments>http://www.distribucon.com/blog/CommentView,guid,c8755312-f231-4981-8332-07422a11622a.aspx</comments>
      <category>.NET</category>
      <category>ALT.NET</category>
      <category>Delphi</category>
    </item>
    <item>
      <trackback:ping>http://www.distribucon.com/blog/Trackback.aspx?guid=40c6e7f2-24ba-4ae0-a2cd-b7d4eee270b3</trackback:ping>
      <pingback:server>http://www.distribucon.com/blog/pingback.aspx</pingback:server>
      <pingback:target>http://www.distribucon.com/blog/PermaLink,guid,40c6e7f2-24ba-4ae0-a2cd-b7d4eee270b3.aspx</pingback:target>
      <dc:creator>Dan Miser</dc:creator>
      <wfw:comment>http://www.distribucon.com/blog/CommentView,guid,40c6e7f2-24ba-4ae0-a2cd-b7d4eee270b3.aspx</wfw:comment>
      <wfw:commentRss>http://www.distribucon.com/blog/SyndicationService.asmx/GetEntryCommentsRss?guid=40c6e7f2-24ba-4ae0-a2cd-b7d4eee270b3</wfw:commentRss>
      <slash:comments>1</slash:comments>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
Sorry for the changing plans, but I just received word that CodeGear won't be able
to make it out here for the 2/27 meeting so the DUG meeting will be cancelled. They
may be able to reschedule in April, so that will give us some more lead time, but
for now, things are off. Thanks for your understanding.
</p>
        <img width="0" height="0" src="http://www.distribucon.com/blog/aggbug.ashx?id=40c6e7f2-24ba-4ae0-a2cd-b7d4eee270b3" />
      </body>
      <title>Delphi User Group Meeting Cancelled</title>
      <guid isPermaLink="false">http://www.distribucon.com/blog/PermaLink,guid,40c6e7f2-24ba-4ae0-a2cd-b7d4eee270b3.aspx</guid>
      <link>http://www.distribucon.com/blog/DelphiUserGroupMeetingCancelled.aspx</link>
      <pubDate>Sat, 17 Feb 2007 16:08:54 GMT</pubDate>
      <description>&lt;p&gt;
Sorry for the changing plans, but I just received word that CodeGear won't be able
to make it out here for the 2/27 meeting so the DUG meeting will be cancelled. They
may be able to reschedule in April, so that will give us some more lead time, but
for now, things are off. Thanks for your understanding.
&lt;/p&gt;
&lt;img width="0" height="0" src="http://www.distribucon.com/blog/aggbug.ashx?id=40c6e7f2-24ba-4ae0-a2cd-b7d4eee270b3" /&gt;</description>
      <comments>http://www.distribucon.com/blog/CommentView,guid,40c6e7f2-24ba-4ae0-a2cd-b7d4eee270b3.aspx</comments>
      <category>Delphi</category>
    </item>
    <item>
      <trackback:ping>http://www.distribucon.com/blog/Trackback.aspx?guid=11e7230c-4ab5-4a65-adb3-ad4870717131</trackback:ping>
      <pingback:server>http://www.distribucon.com/blog/pingback.aspx</pingback:server>
      <pingback:target>http://www.distribucon.com/blog/PermaLink,guid,11e7230c-4ab5-4a65-adb3-ad4870717131.aspx</pingback:target>
      <dc:creator>Dan Miser</dc:creator>
      <wfw:comment>http://www.distribucon.com/blog/CommentView,guid,11e7230c-4ab5-4a65-adb3-ad4870717131.aspx</wfw:comment>
      <wfw:commentRss>http://www.distribucon.com/blog/SyndicationService.asmx/GetEntryCommentsRss?guid=11e7230c-4ab5-4a65-adb3-ad4870717131</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">I just received an email from Anders Ohlsson,
and he wants to schedule Milwaukee as a stop on a 10-city tour. I take that as a positive
sign that Milwaukee matters enough to warrant a stop. Let's keep that perception alive
by coming out and attending this meeting! The very tentative details right now are:<br /><ul><li>
What: Delphi User Group Meeting 
</li><li>
When: Tuesday, 2/27/07 from 7pm-9pm. 
</li><li>
Where: <a href="http://maps.yahoo.com/maps_result?addr=10000+Innovation+Dr.&amp;csz=Milwaukee%2C+WI+53226&amp;country=us&amp;new=1&amp;name=&amp;qty=" target="_new">Medical
College of Wisconsin</a></li><li>
Why: Because you want to hear about updates on CodeGear, the roadmap and Delphi itself.
CodeGear would also provide door prizes and a rebate offer. 
</li><li>
How: RSVP by <a href="mailto:dmiser@wi.rr.com">emailing me</a>. 
</li></ul><p>
If you have any other thoughts, concerns, questions, etc., send me an email. I will
post final details once we have them.<img width="0" height="0" src="http://www.distribucon.com/blog/aggbug.ashx?id=11e7230c-4ab5-4a65-adb3-ad4870717131" /></p></body>
      <title>Delphi User Group Meeting</title>
      <guid isPermaLink="false">http://www.distribucon.com/blog/PermaLink,guid,11e7230c-4ab5-4a65-adb3-ad4870717131.aspx</guid>
      <link>http://www.distribucon.com/blog/DelphiUserGroupMeeting.aspx</link>
      <pubDate>Tue, 06 Feb 2007 19:29:00 GMT</pubDate>
      <description>I just received an email from Anders Ohlsson, and he wants to schedule Milwaukee as a stop on a 10-city tour. I take that as a positive sign that Milwaukee matters enough to warrant a stop. Let's keep that perception alive by coming out and attending this meeting! The very tentative details right now are:&lt;br&gt;
&lt;ul&gt;
&lt;li&gt;
What: Delphi User Group Meeting 
&lt;li&gt;
When: Tuesday, 2/27/07 from 7pm-9pm. 
&lt;li&gt;
Where: &lt;a href="http://maps.yahoo.com/maps_result?addr=10000+Innovation+Dr.&amp;amp;csz=Milwaukee%2C+WI+53226&amp;amp;country=us&amp;amp;new=1&amp;amp;name=&amp;amp;qty=" target=_new&gt;Medical
College of Wisconsin&lt;/a&gt; 
&lt;li&gt;
Why: Because you want to hear about updates on CodeGear, the roadmap and Delphi itself.
CodeGear would also provide door prizes and a rebate offer. 
&lt;li&gt;
How: RSVP by &lt;a href="mailto:dmiser@wi.rr.com"&gt;emailing me&lt;/a&gt;. 
&lt;/ul&gt;
&lt;p&gt;
If you have any other thoughts, concerns, questions, etc., send me an email. I will
post final details once we have them.&lt;img width="0" height="0" src="http://www.distribucon.com/blog/aggbug.ashx?id=11e7230c-4ab5-4a65-adb3-ad4870717131" /&gt;</description>
      <comments>http://www.distribucon.com/blog/CommentView,guid,11e7230c-4ab5-4a65-adb3-ad4870717131.aspx</comments>
      <category>Delphi</category>
    </item>
    <item>
      <trackback:ping>http://www.distribucon.com/blog/Trackback.aspx?guid=4e7c04fa-d5ab-4934-8408-bf3e7467f21c</trackback:ping>
      <pingback:server>http://www.distribucon.com/blog/pingback.aspx</pingback:server>
      <pingback:target>http://www.distribucon.com/blog/PermaLink,guid,4e7c04fa-d5ab-4934-8408-bf3e7467f21c.aspx</pingback:target>
      <dc:creator>Dan Miser</dc:creator>
      <wfw:comment>http://www.distribucon.com/blog/CommentView,guid,4e7c04fa-d5ab-4934-8408-bf3e7467f21c.aspx</wfw:comment>
      <wfw:commentRss>http://www.distribucon.com/blog/SyndicationService.asmx/GetEntryCommentsRss?guid=4e7c04fa-d5ab-4934-8408-bf3e7467f21c</wfw:commentRss>
      <slash:comments>2</slash:comments>
      <body xmlns="http://www.w3.org/1999/xhtml">It looks like lots of changes are going
on here. First off, I am now working in C# full-time since I took a job with <a href="http://www.spiderlogic.com/" target="_new">SpiderLogic</a>.
I think this is going to be a great opportunity for me to expand and grow again. I
doubt I will ever be out of Delphi completely, but my new focus is definitely going
to be on .NET. As such, I contacted <a href="http://www.delphifeeds.com" target="_new">DelphiFeeds</a> to
tell them to use just my Delphi category. Someone contacted me after a VS.NET post
and mentioned that it seemed strange to see that on the Delphi feed, and I agreed.
I don't want to clutter a very good Delphi resource up with blog posts about a competing
IDE and/or language. However, if you like what you read here, I would encourage you
to subscribe to my main feed, too. 
<p>
The other change is on my blog. With prompting from <a href="http://www.stevetrefethen.com" target="_new">Steve
Trefethen</a>, I made the switch to <a href="http://www.dasblog.info/" target="_new">dasBlog</a>.
I had set dasBlog up for our internal blog at my last place of employment, and it
worked great. I got tired of the lack of options that .Text provided, so I felt I
had to do something. dasBlog provides a couple of features that I really wanted, like
searching and better spam prevention. In addition, it's actively being developed. 
</p><p>
Converting was fairly painless. I read a post by Scott Hanselman about <a href="http://www.hanselman.com/blog/MigratingContentFromRandomBlogsToDasBlog.aspx" target="_new">migrating
to dasBlog</a>, and from there I found <a href="http://www.casadehambone.com/DotText2DasBlogATextToDasBlogConverter.aspx" target="_new">some
code to help automate the conversion</a>. There are several dead links out there,
so finding this one was a definite time saver. I changed the code slightly to get
categories out of .Text and into dasBlog. I changed the main SQL statement to the
one below, and then just added a line of code to add that category information to
the dasBlog conversion code. This works for me because I didn't use multiple categories
for a post. 
</p><pre><code> SELECT blog_Content.ID, blog_Content.Title, blog_Content.DateAdded,
blog_Content.SourceUrl, blog_Content.PostType, blog_Content.Author, blog_Content.Email,
blog_Content.SourceName, blog_Content.BlogID, blog_Content.Description, blog_Content.DateUpdated,
blog_Content.TitleUrl, blog_Content.Text, blog_Content.ParentID, blog_Content.FeedBackCount,
blog_Content.PostConfig, blog_Content.EntryName, blog_LinkCategories.Title AS CategoryTitle
FROM blog_Content LEFT OUTER JOIN blog_Links ON blog_Links.PostID = blog_Content.ID
LEFT OUTER JOIN blog_LinkCategories ON blog_Links.CategoryID = blog_LinkCategories.CategoryID </code></pre><p>
I was worried about <a href="http://www.hanselman.com/blog/MaintainingPermaLinksWhenMovingFromTextToDasBlog.aspx" target="_new">old
URLs that were used from my .Text blog</a>, but the later versions of dasBlog already
do URL rewriting to make that transition absolutely seamless. I also use <a href="http://www.wbloggar.com/" target="_new">w.bloggar</a> for
writing my entires, so I had to <a href="http://dasblog.info/CategoryView,category,Remote%20Bloggers,W.Bloggar.aspx" target="_new">change
some settings</a> to get that to work with dasBlog. Lastly, I updated my RSS feed
to <a href="http://www.stevetrefethen.com/blog/UsingFeedBurnerForYourRSSFeed.aspx" target="_new">use
FeedBurner</a>. 
</p><p>
All in all, I'm quite happy with how things turned out. If you see any problems, please
feel free to let me know. 
</p><img width="0" height="0" src="http://www.distribucon.com/blog/aggbug.ashx?id=4e7c04fa-d5ab-4934-8408-bf3e7467f21c" /></body>
      <title>Ch- Ch- Changes</title>
      <guid isPermaLink="false">http://www.distribucon.com/blog/PermaLink,guid,4e7c04fa-d5ab-4934-8408-bf3e7467f21c.aspx</guid>
      <link>http://www.distribucon.com/blog/ChChChanges.aspx</link>
      <pubDate>Mon, 18 Dec 2006 15:42:22 GMT</pubDate>
      <description>It looks like lots of changes are going on here. First off, I am now working in C# full-time since I took a job with &lt;a href="http://www.spiderlogic.com/" target=_new&gt;SpiderLogic&lt;/a&gt;.
I think this is going to be a great opportunity for me to expand and grow again. I
doubt I will ever be out of Delphi completely, but my new focus is definitely going
to be on .NET. As such, I contacted &lt;a href="http://www.delphifeeds.com" target=_new&gt;DelphiFeeds&lt;/a&gt; to
tell them to use just my Delphi category. Someone contacted me after a VS.NET post
and mentioned that it seemed strange to see that on the Delphi feed, and I agreed.
I don't want to clutter a very good Delphi resource up with blog posts about a competing
IDE and/or language. However, if you like what you read here, I would encourage you
to subscribe to my main feed, too. 
&lt;p&gt;
The other change is on my blog. With prompting from &lt;a href="http://www.stevetrefethen.com" target=_new&gt;Steve
Trefethen&lt;/a&gt;, I made the switch to &lt;a href="http://www.dasblog.info/" target=_new&gt;dasBlog&lt;/a&gt;.
I had set dasBlog up for our internal blog at my last place of employment, and it
worked great. I got tired of the lack of options that .Text provided, so I felt I
had to do something. dasBlog provides a couple of features that I really wanted, like
searching and better spam prevention. In addition, it's actively being developed. 
&lt;p&gt;
Converting was fairly painless. I read a post by Scott Hanselman about &lt;a href="http://www.hanselman.com/blog/MigratingContentFromRandomBlogsToDasBlog.aspx" target=_new&gt;migrating
to dasBlog&lt;/a&gt;, and from there I found &lt;a href="http://www.casadehambone.com/DotText2DasBlogATextToDasBlogConverter.aspx" target=_new&gt;some
code to help automate the conversion&lt;/a&gt;. There are several dead links out there,
so finding this one was a definite time saver. I changed the code slightly to get
categories out of .Text and into dasBlog. I changed the main SQL statement to the
one below, and then just added a line of code to add that category information to
the dasBlog conversion code. This works for me because I didn't use multiple categories
for a post. &lt;pre&gt;&lt;code&gt; SELECT blog_Content.ID, blog_Content.Title, blog_Content.DateAdded,
blog_Content.SourceUrl, blog_Content.PostType, blog_Content.Author, blog_Content.Email,
blog_Content.SourceName, blog_Content.BlogID, blog_Content.Description, blog_Content.DateUpdated,
blog_Content.TitleUrl, blog_Content.Text, blog_Content.ParentID, blog_Content.FeedBackCount,
blog_Content.PostConfig, blog_Content.EntryName, blog_LinkCategories.Title AS CategoryTitle
FROM blog_Content LEFT OUTER JOIN blog_Links ON blog_Links.PostID = blog_Content.ID
LEFT OUTER JOIN blog_LinkCategories ON blog_Links.CategoryID = blog_LinkCategories.CategoryID &lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;
I was worried about &lt;a href="http://www.hanselman.com/blog/MaintainingPermaLinksWhenMovingFromTextToDasBlog.aspx" target=_new&gt;old
URLs that were used from my .Text blog&lt;/a&gt;, but the later versions of dasBlog already
do URL rewriting to make that transition absolutely seamless. I also use &lt;a href="http://www.wbloggar.com/" target=_new&gt;w.bloggar&lt;/a&gt; for
writing my entires, so I had to &lt;a href="http://dasblog.info/CategoryView,category,Remote%20Bloggers,W.Bloggar.aspx" target=_new&gt;change
some settings&lt;/a&gt; to get that to work with dasBlog. Lastly, I updated my RSS feed
to &lt;a href="http://www.stevetrefethen.com/blog/UsingFeedBurnerForYourRSSFeed.aspx" target=_new&gt;use
FeedBurner&lt;/a&gt;. 
&lt;p&gt;
All in all, I'm quite happy with how things turned out. If you see any problems, please
feel free to let me know. 
&lt;/p&gt;
&lt;img width="0" height="0" src="http://www.distribucon.com/blog/aggbug.ashx?id=4e7c04fa-d5ab-4934-8408-bf3e7467f21c" /&gt;</description>
      <comments>http://www.distribucon.com/blog/CommentView,guid,4e7c04fa-d5ab-4934-8408-bf3e7467f21c.aspx</comments>
      <category>Delphi</category>
    </item>
    <item>
      <trackback:ping>http://www.distribucon.com/blog/Trackback.aspx?guid=1547</trackback:ping>
      <pingback:server>http://www.distribucon.com/blog/pingback.aspx</pingback:server>
      <pingback:target>http://www.distribucon.com/blog/PermaLink,guid,1547.aspx</pingback:target>
      <dc:creator />
      <wfw:comment>http://www.distribucon.com/blog/CommentView,guid,1547.aspx</wfw:comment>
      <wfw:commentRss>http://www.distribucon.com/blog/SyndicationService.asmx/GetEntryCommentsRss?guid=1547</wfw:commentRss>
      <slash:comments>1</slash:comments>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <a href="http://www.devexpress.com/Products/NET/IDETools/CodeRush/" target="_new">CodeRush</a> and <a href="http://www.devexpress.com/Products/NET/IDETools/Refactor/" target="_new">Refactor!</a> are
2 very powerful VS.NET add-ins that let you program faster. They are made by Developer
Express, which is a software company that I have had nothing but incredible dealings
with over the years in the Delphi area. As a matter of fact, I used CodeRush for about
a year on Delphi way back in the day (maybe 1998?). Even though Mark Miller is the
lead man responsible for these products, I'll still use it. (Just kidding, Mark!).
In all seriousness, Mark is one of those unique developers who has the passion, vision
and technical chops to back it up. I've also known Mark for years from the BorCon
speaker circuit. I would highly recommend paying attention to whatever he does, because
he does things right. 
<p>
CodeRush is integrated into the IDE, "bringing you new ways to look at code, new ways
to generate code, new ways to navigate through code, and new ways to create your own
extensions to your development environment." It is very configurable. There is also
a nice training window that will help remind you of what keystrokes to press to generate
code. Once you have the keystrokes mastered, you can turn it off. 
</p><p>
Refactor! Pro is just unbelievable. It provides over 50 refactorings built-in that
work with C#, VB, <b>and</b> C++. At the heart of this product is the mindset that
you should never lose workflow with modal dialogs. The result is a thing of beauty,
with some of the best eye candy out there. Beauty is fine, but I really want a tool
that doesn't miss refactorings, and this tool has proven incredibly reliable on that
side as well. For a quick overview of Refactor, check out this <a href="http://msdn.microsoft.com/VBasic/Downloads/Tools/Refactor/3MinDemo.Aspx" target="_new">3
Minute Overview</a> on MSDN.<img width="0" height="0" src="http://www.distribucon.com/blog/aggbug.ashx?id=1547" /></p></body>
      <title>CodeRush and Refactor!</title>
      <guid isPermaLink="false">http://www.distribucon.com/blog/PermaLink,guid,1547.aspx</guid>
      <link>http://www.distribucon.com/blog/CodeRushAndRefactor.aspx</link>
      <pubDate>Sun, 03 Dec 2006 23:38:00 GMT</pubDate>
      <description>&lt;a href="http://www.devexpress.com/Products/NET/IDETools/CodeRush/" target="_new"&gt;CodeRush&lt;/a&gt; and &lt;a href="http://www.devexpress.com/Products/NET/IDETools/Refactor/" target="_new"&gt;Refactor!&lt;/a&gt; are
2 very powerful VS.NET add-ins that let you program faster. They are made by Developer
Express, which is a software company that I have had nothing but incredible dealings
with over the years in the Delphi area. As a matter of fact, I used CodeRush for about
a year on Delphi way back in the day (maybe 1998?). Even though Mark Miller is the
lead man responsible for these products, I'll still use it. (Just kidding, Mark!).
In all seriousness, Mark is one of those unique developers who has the passion, vision
and technical chops to back it up. I've also known Mark for years from the BorCon
speaker circuit. I would highly recommend paying attention to whatever he does, because
he does things right. 
&lt;p&gt;
CodeRush is integrated into the IDE, "bringing you new ways to look at code, new ways
to generate code, new ways to navigate through code, and new ways to create your own
extensions to your development environment." It is very configurable. There is also
a nice training window that will help remind you of what keystrokes to press to generate
code. Once you have the keystrokes mastered, you can turn it off. 
&lt;p&gt;
Refactor! Pro is just unbelievable. It provides over 50 refactorings built-in that
work with C#, VB, &lt;b&gt;and&lt;/b&gt; C++. At the heart of this product is the mindset that
you should never lose workflow with modal dialogs. The result is a thing of beauty,
with some of the best eye candy out there. Beauty is fine, but I really want a tool
that doesn't miss refactorings, and this tool has proven incredibly reliable on that
side as well. For a quick overview of Refactor, check out this &lt;a href="http://msdn.microsoft.com/VBasic/Downloads/Tools/Refactor/3MinDemo.Aspx" target="_new"&gt;3
Minute Overview&lt;/a&gt; on MSDN.&lt;img width="0" height="0" src="http://www.distribucon.com/blog/aggbug.ashx?id=1547" /&gt;</description>
      <comments>http://www.distribucon.com/blog/CommentView,guid,1547.aspx</comments>
      <category>Delphi</category>
    </item>
    <item>
      <trackback:ping>http://www.distribucon.com/blog/Trackback.aspx?guid=1475</trackback:ping>
      <pingback:server>http://www.distribucon.com/blog/pingback.aspx</pingback:server>
      <pingback:target>http://www.distribucon.com/blog/PermaLink,guid,1475.aspx</pingback:target>
      <dc:creator />
      <wfw:comment>http://www.distribucon.com/blog/CommentView,guid,1475.aspx</wfw:comment>
      <wfw:commentRss>http://www.distribucon.com/blog/SyndicationService.asmx/GetEntryCommentsRss?guid=1475</wfw:commentRss>
      <slash:comments>3</slash:comments>
      <body xmlns="http://www.w3.org/1999/xhtml">I've been doing a lot more .NET lately,
and while doing that, I've been evaluating a lot of different architectures and patterns.
During my career, I've done mainly Delphi and Java, with some side jaunts into less
travelled paths (e.g. MUMPS, Intermec, etc.). One thing that I have definitely learned
is that the more exposure one has to other environments and languages, the better
that person becomes overall. It provides a way to map new ideas into existing languages,
and vice-versa. 
<p>
A while back, I came across Martin Fowler's, et al. term <a href="http://en.wikipedia.org/wiki/Plain_Old_Java_Object" target="_new">POJO</a>,
which itself is a continuation of other "Plain Old" terms in computer science. The
reason it became a mainstream acronym is that there were many frameworks in Java that
were adding complexity to objects, and Fowler wanted to get developers to at least
question whether architectures with simple objects were viable under certain conditions. 
</p><p>
Therefore, my contribution to the computer science lexicon is PONO, or Plain Old (dot)Net
Object. As frameworks continue to emerge on the .NET side, the problems that caused
POJO to gain ground in the Java camp will become more prevalent in the .NET camp.<img width="0" height="0" src="http://www.distribucon.com/blog/aggbug.ashx?id=1475" /></p></body>
      <title>Claiming dibs on a reinvented term (PONO)</title>
      <guid isPermaLink="false">http://www.distribucon.com/blog/PermaLink,guid,1475.aspx</guid>
      <link>http://www.distribucon.com/blog/ClaimingDibsOnAReinventedTermPONO.aspx</link>
      <pubDate>Tue, 14 Nov 2006 17:40:00 GMT</pubDate>
      <description>I've been doing a lot more .NET lately, and while doing that, I've been evaluating a lot of different architectures and patterns. During my career, I've done mainly Delphi and Java, with some side jaunts into less travelled paths (e.g. MUMPS, Intermec, etc.). One thing that I have definitely learned is that the more exposure one has to other environments and languages, the better that person becomes overall. It provides a way to map new ideas into existing languages, and vice-versa.
&lt;p&gt;
A while back, I came across Martin Fowler's, et al. term &lt;a href="http://en.wikipedia.org/wiki/Plain_Old_Java_Object" target="_new"&gt;POJO&lt;/a&gt;,
which itself is a continuation of other "Plain Old" terms in computer science. The
reason it became a mainstream acronym is that there were many frameworks in Java that
were adding complexity to objects, and Fowler wanted to get developers to at least
question whether architectures with simple objects were viable under certain conditions. 
&lt;p&gt;
Therefore, my contribution to the computer science lexicon is PONO, or Plain Old (dot)Net
Object. As frameworks continue to emerge on the .NET side, the problems that caused
POJO to gain ground in the Java camp will become more prevalent in the .NET camp.&lt;img width="0" height="0" src="http://www.distribucon.com/blog/aggbug.ashx?id=1475" /&gt;</description>
      <comments>http://www.distribucon.com/blog/CommentView,guid,1475.aspx</comments>
      <category>Delphi</category>
    </item>
    <item>
      <trackback:ping>http://www.distribucon.com/blog/Trackback.aspx?guid=1383</trackback:ping>
      <pingback:server>http://www.distribucon.com/blog/pingback.aspx</pingback:server>
      <pingback:target>http://www.distribucon.com/blog/PermaLink,guid,1383.aspx</pingback:target>
      <dc:creator />
      <wfw:comment>http://www.distribucon.com/blog/CommentView,guid,1383.aspx</wfw:comment>
      <wfw:commentRss>http://www.distribucon.com/blog/SyndicationService.asmx/GetEntryCommentsRss?guid=1383</wfw:commentRss>
      <slash:comments>5</slash:comments>
      <body xmlns="http://www.w3.org/1999/xhtml">David Riggs, the Editor of the <a href="http://www.informant.com" target="_new">Delphi
Informant</a>, has given me permission to publish my old articles and editorials.
He was even kind enough to provide the type-set copies as Word documents. We'll see
how good the conversion from Word to HTML works. 
<p>
The articles can be found - strangely enough - on the <a href="http://www.distribucon.com/articles.asp" target="_new">Articles
page</a> of my web site. For some reason, we don't have the original TIniSource article,
but that just gives you an excuse to purchase the Delphi Informant CD archive. :-) 
</p><p>
Obviously, these are older articles, and some of the information may be dated, but
hopefully, there will still be something worthwhile to take away. Let me know if you
find anything glaring that needs correction.<img width="0" height="0" src="http://www.distribucon.com/blog/aggbug.ashx?id=1383" /></p></body>
      <title>Delphi Informant articles released</title>
      <guid isPermaLink="false">http://www.distribucon.com/blog/PermaLink,guid,1383.aspx</guid>
      <link>http://www.distribucon.com/blog/DelphiInformantArticlesReleased.aspx</link>
      <pubDate>Mon, 23 Oct 2006 21:27:00 GMT</pubDate>
      <description>David Riggs, the Editor of the &lt;a href="http://www.informant.com" target="_new"&gt;Delphi
Informant&lt;/a&gt;, has given me permission to publish my old articles and editorials.
He was even kind enough to provide the type-set copies as Word documents. We'll see
how good the conversion from Word to HTML works. 
&lt;p&gt;
The articles can be found - strangely enough - on the &lt;a href="http://www.distribucon.com/articles.asp" target="_new"&gt;Articles
page&lt;/a&gt; of my web site. For some reason, we don't have the original TIniSource article,
but that just gives you an excuse to purchase the Delphi Informant CD archive. :-) 
&lt;p&gt;
Obviously, these are older articles, and some of the information may be dated, but
hopefully, there will still be something worthwhile to take away. Let me know if you
find anything glaring that needs correction.&lt;img width="0" height="0" src="http://www.distribucon.com/blog/aggbug.ashx?id=1383" /&gt;</description>
      <comments>http://www.distribucon.com/blog/CommentView,guid,1383.aspx</comments>
      <category>Delphi</category>
    </item>
    <item>
      <trackback:ping>http://www.distribucon.com/blog/Trackback.aspx?guid=1156</trackback:ping>
      <pingback:server>http://www.distribucon.com/blog/pingback.aspx</pingback:server>
      <pingback:target>http://www.distribucon.com/blog/PermaLink,guid,1156.aspx</pingback:target>
      <dc:creator />
      <wfw:comment>http://www.distribucon.com/blog/CommentView,guid,1156.aspx</wfw:comment>
      <wfw:commentRss>http://www.distribucon.com/blog/SyndicationService.asmx/GetEntryCommentsRss?guid=1156</wfw:commentRss>
      <slash:comments>3</slash:comments>
      <body xmlns="http://www.w3.org/1999/xhtml">It seems that COM interop isn't always
a good thing. I have a problem that I don't have a solution for right now, so if you
have any feedback, I'd sure appreciate hearing it. 
<p>
I wrote a wrapper around Lucene.Net to provide simple API access to some very basic
operations (index, search, delete) that will be used by a Delphi Win32 application.
Everything was working fine, but deep in the bowels of the Lucene code, in one code
path, I encountered a line like this: 
</p><p></p><pre><code> return (float) (System.Math.Log(numDocs / (double) (docFreq + 1))
+ 1.0); </code></pre><p>
When there are no documents in the index, this essentially evaluates to a call to
System.Math.Log(0.0), which <a href="http://msdn2.microsoft.com/en-us/library/x80ywz41.aspx" target="_new">according
to the MSDN documentation</a>, should return NegativeInfinity. In fact, when this
library is called from a .NET client, it does just that. However, when called via
COM interop, this results in an exception, "Attempted to divide by zero". I started
to modify the Lucene source to do a check for this condition and just manually return
NegativeInfinity, and that did get me past that point, but then later on in the Lucene
code, I end up getting an "Arithmetic overflow/underflow" error when Lucene tries
to do some math on the returned value. So rather than continue to band-aid this problem,
I thought I'd try to dig to the root of the problem to see why this is happening. 
</p><p>
You can find an extremely simple test case with a .NET Class Library, .NET test client,
and Delphi test client <a href="http://www.distribucon.com/download/dotnet/LogException.zip" target="_new">here</a>.
Just build the .NET solution, and then you can run the createtlb.bat file in the LogClient
directory to get the Delphi project ready.<img width="0" height="0" src="http://www.distribucon.com/blog/aggbug.ashx?id=1156" /></p></body>
      <title>When Interop goes bad</title>
      <guid isPermaLink="false">http://www.distribucon.com/blog/PermaLink,guid,1156.aspx</guid>
      <link>http://www.distribucon.com/blog/WhenInteropGoesBad.aspx</link>
      <pubDate>Wed, 13 Sep 2006 16:11:00 GMT</pubDate>
      <description>It seems that COM interop isn't always a good thing. I have a problem that I don't have a solution for right now, so if you have any feedback, I'd sure appreciate hearing it.
&lt;p&gt;
I wrote a wrapper around Lucene.Net to provide simple API access to some very basic
operations (index, search, delete) that will be used by a Delphi Win32 application.
Everything was working fine, but deep in the bowels of the Lucene code, in one code
path, I encountered a line like this: 
&lt;p&gt;
&lt;pre&gt;&lt;code&gt; return (float) (System.Math.Log(numDocs / (double) (docFreq + 1)) + 1.0); &lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;
When there are no documents in the index, this essentially evaluates to a call to
System.Math.Log(0.0), which &lt;a href="http://msdn2.microsoft.com/en-us/library/x80ywz41.aspx" target="_new"&gt;according
to the MSDN documentation&lt;/a&gt;, should return NegativeInfinity. In fact, when this
library is called from a .NET client, it does just that. However, when called via
COM interop, this results in an exception, "Attempted to divide by zero". I started
to modify the Lucene source to do a check for this condition and just manually return
NegativeInfinity, and that did get me past that point, but then later on in the Lucene
code, I end up getting an "Arithmetic overflow/underflow" error when Lucene tries
to do some math on the returned value. So rather than continue to band-aid this problem,
I thought I'd try to dig to the root of the problem to see why this is happening. 
&lt;p&gt;
You can find an extremely simple test case with a .NET Class Library, .NET test client,
and Delphi test client &lt;a href="http://www.distribucon.com/download/dotnet/LogException.zip" target="_new"&gt;here&lt;/a&gt;.
Just build the .NET solution, and then you can run the createtlb.bat file in the LogClient
directory to get the Delphi project ready.&lt;img width="0" height="0" src="http://www.distribucon.com/blog/aggbug.ashx?id=1156" /&gt;</description>
      <comments>http://www.distribucon.com/blog/CommentView,guid,1156.aspx</comments>
      <category>Delphi</category>
    </item>
    <item>
      <trackback:ping>http://www.distribucon.com/blog/Trackback.aspx?guid=1139</trackback:ping>
      <pingback:server>http://www.distribucon.com/blog/pingback.aspx</pingback:server>
      <pingback:target>http://www.distribucon.com/blog/PermaLink,guid,1139.aspx</pingback:target>
      <dc:creator />
      <wfw:comment>http://www.distribucon.com/blog/CommentView,guid,1139.aspx</wfw:comment>
      <wfw:commentRss>http://www.distribucon.com/blog/SyndicationService.asmx/GetEntryCommentsRss?guid=1139</wfw:commentRss>
      <slash:comments>3</slash:comments>
      <body xmlns="http://www.w3.org/1999/xhtml">I came across a link to <a href="http://www.blunck.info/comtrace.html" target="_new">COMTrace</a> from <a href="http://www.hanselman.com/blog/ScottHanselmans2006UltimateDeveloperAndPowerUsersToolListForWindows.aspx" target="_new">Scott
Hanselman</a>. This tool allows for interception and logging of COM traffic. I just
tried it out, and it mostly works on some of my more complex MIDAS applications. Granted,
it is far from perfect (e.g. I needed to start a new process multiple times before
I could get it to work when tracing an app server, or it would hang when starting
a client process), but I was able to eventually use it to get tracing information
on all of the round-trips that the application makes, including seeing parameters
being passed from client to server. From the history log, it appears that the last
change was in 2002, so it's a bit dated. 
<p>
A while back, I was going to develop a tool like this, and actually had some things
working on the Delphi level by intercepting VarDispHandler, but that would only work
within an application, and for late-bound calls. That didn't sit well with me, as
I wanted all traffic intercepted, be it early-bound or late-bound, and I didn't want
to necessarily instrument my applications with my tracing/hooking code. I started
looking at Keith Brown's <a href="http://www.develop.com/technology/resourcedetail.aspx?id=76121ebc-beab-42a9-a891-869c4be57771" target="_new">Universal
Delegator</a>, and associated tools, and was going to go down that route, but the
priority changed on having this tool, so it got shelved. It's nice to see that something
is out there, even if it is imperfect.<img width="0" height="0" src="http://www.distribucon.com/blog/aggbug.ashx?id=1139" /></p></body>
      <title>COMTrace</title>
      <guid isPermaLink="false">http://www.distribucon.com/blog/PermaLink,guid,1139.aspx</guid>
      <link>http://www.distribucon.com/blog/COMTrace.aspx</link>
      <pubDate>Tue, 29 Aug 2006 19:27:00 GMT</pubDate>
      <description>I came across a link to &lt;a href="http://www.blunck.info/comtrace.html" target="_new"&gt;COMTrace&lt;/a&gt; from &lt;a href="http://www.hanselman.com/blog/ScottHanselmans2006UltimateDeveloperAndPowerUsersToolListForWindows.aspx" target="_new"&gt;Scott
Hanselman&lt;/a&gt;. This tool allows for interception and logging of COM traffic. I just
tried it out, and it mostly works on some of my more complex MIDAS applications. Granted,
it is far from perfect (e.g. I needed to start a new process multiple times before
I could get it to work when tracing an app server, or it would hang when starting
a client process), but I was able to eventually use it to get tracing information
on all of the round-trips that the application makes, including seeing parameters
being passed from client to server. From the history log, it appears that the last
change was in 2002, so it's a bit dated. 
&lt;p&gt;
A while back, I was going to develop a tool like this, and actually had some things
working on the Delphi level by intercepting VarDispHandler, but that would only work
within an application, and for late-bound calls. That didn't sit well with me, as
I wanted all traffic intercepted, be it early-bound or late-bound, and I didn't want
to necessarily instrument my applications with my tracing/hooking code. I started
looking at Keith Brown's &lt;a href="http://www.develop.com/technology/resourcedetail.aspx?id=76121ebc-beab-42a9-a891-869c4be57771" target="_new"&gt;Universal
Delegator&lt;/a&gt;, and associated tools, and was going to go down that route, but the
priority changed on having this tool, so it got shelved. It's nice to see that something
is out there, even if it is imperfect.&lt;img width="0" height="0" src="http://www.distribucon.com/blog/aggbug.ashx?id=1139" /&gt;</description>
      <comments>http://www.distribucon.com/blog/CommentView,guid,1139.aspx</comments>
      <category>Delphi</category>
    </item>
    <item>
      <trackback:ping>http://www.distribucon.com/blog/Trackback.aspx?guid=1122</trackback:ping>
      <pingback:server>http://www.distribucon.com/blog/pingback.aspx</pingback:server>
      <pingback:target>http://www.distribucon.com/blog/PermaLink,guid,1122.aspx</pingback:target>
      <dc:creator />
      <wfw:comment>http://www.distribucon.com/blog/CommentView,guid,1122.aspx</wfw:comment>
      <wfw:commentRss>http://www.distribucon.com/blog/SyndicationService.asmx/GetEntryCommentsRss?guid=1122</wfw:commentRss>
      <slash:comments>2</slash:comments>
      <body xmlns="http://www.w3.org/1999/xhtml">I wrote a VS.NET 2005 class library that
I wanted to use from Delphi. Using COM Interop, this should be a breeze. Simply call
"regasm MyLibrary.dll /tlb" and I should get a type library that I can import in Delphi.
If that's all there was to it, then I wouldn't be blogging. ;-) 
<p>
The first problem I had was that when I ran this command, I got an error stating:<br />
RegAsm error: Failed to load 'C:\MyLibrary.dll' because it is not a valid .NET assembly 
</p><p>
This was weird, considering it was a .NET assembly. The problem was that the regasm
being used was the one from the .NET 1.1 framework, so it choked on my .NET 2.0 compiled
application. Simply running the VS 2005 Command Prompt and re-running regasm got the
type library I wanted - or so I thought. 
</p><p>
I marked the classes I wanted exported via COM with the [ComVisible(true)] attribute,
but the only thing exported to the type library was classes with no members. In order
to get the members exported, I ended up putting the [ClassInterface(ClassInterfaceType.AutoDual)]
attribute on the class, too. This isn't the optimal approach, according to MSDN, so
I'll end up extracting the members to an interface and exposing that instead, but
at least I'm up and running for the moment.<img width="0" height="0" src="http://www.distribucon.com/blog/aggbug.ashx?id=1122" /></p></body>
      <title>COM Interop</title>
      <guid isPermaLink="false">http://www.distribucon.com/blog/PermaLink,guid,1122.aspx</guid>
      <link>http://www.distribucon.com/blog/COMInterop.aspx</link>
      <pubDate>Tue, 22 Aug 2006 03:40:00 GMT</pubDate>
      <description>I wrote a VS.NET 2005 class library that I wanted to use from Delphi. Using COM Interop, this should be a breeze. Simply call "regasm MyLibrary.dll /tlb" and I should get a type library that I can import in Delphi. If that's all there was to it, then I wouldn't be blogging. ;-)
&lt;p&gt;
The first problem I had was that when I ran this command, I got an error stating:&lt;br&gt;
RegAsm error: Failed to load 'C:\MyLibrary.dll' because it is not a valid .NET assembly 
&lt;p&gt;
This was weird, considering it was a .NET assembly. The problem was that the regasm
being used was the one from the .NET 1.1 framework, so it choked on my .NET 2.0 compiled
application. Simply running the VS 2005 Command Prompt and re-running regasm got the
type library I wanted - or so I thought. 
&lt;p&gt;
I marked the classes I wanted exported via COM with the [ComVisible(true)] attribute,
but the only thing exported to the type library was classes with no members. In order
to get the members exported, I ended up putting the [ClassInterface(ClassInterfaceType.AutoDual)]
attribute on the class, too. This isn't the optimal approach, according to MSDN, so
I'll end up extracting the members to an interface and exposing that instead, but
at least I'm up and running for the moment.&lt;img width="0" height="0" src="http://www.distribucon.com/blog/aggbug.ashx?id=1122" /&gt;</description>
      <comments>http://www.distribucon.com/blog/CommentView,guid,1122.aspx</comments>
      <category>Delphi</category>
    </item>
    <item>
      <trackback:ping>http://www.distribucon.com/blog/Trackback.aspx?guid=1033</trackback:ping>
      <pingback:server>http://www.distribucon.com/blog/pingback.aspx</pingback:server>
      <pingback:target>http://www.distribucon.com/blog/PermaLink,guid,1033.aspx</pingback:target>
      <dc:creator />
      <wfw:comment>http://www.distribucon.com/blog/CommentView,guid,1033.aspx</wfw:comment>
      <wfw:commentRss>http://www.distribucon.com/blog/SyndicationService.asmx/GetEntryCommentsRss?guid=1033</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">Time to confess: I'm a fan of data binding.
I've loved it ever since Delphi 3 made it workable by introducing TClientDataset.
It's powerful, but makes application code fairly simple. Yes, it can be - and often,
is - abused when used incorrectly, but overall, it's a good concept. 
<p>
I recently worked on getting data binding in a .NET 2.0 application to work with a
lookup combobox. The concept is pretty straight-forward (and very analogous to Delphi's
TDBLookupCombobox). Databinding in .NET is pretty impressive, and a step forward from
where Delphi currently is. For example, you can bind straight to business objects
as opposed to being required to consume database resources/components to complete
data binding. One big snag was in getting the lookup relationship to respect null
values properly. For example, assume you have 2 very simple classes, Order and Supplier,
that are bound via BindingSource components. Furthermore, assume you have your data
binding set up properly to have a ComboBox set with DataSource=orderBindingSource,
DisplayMember=Name, ValueMember=SupplierID, and nameComboBox.DataBindings.Add(new
Binding("SelectedValue", this.orderBindingSource, "SupplierID", true)); (see <a href="http://www.softinsight.com/bnoyes/PermaLink.aspx?guid=54fc20d7-e1ad-407b-893b-11db0f3e7a2b" target="_new">this
reference</a> or <a href="http://www.windowsforms.net/Samples/Go%20To%20Market/Data%20Binding/DataBinding%20FAQ.doc" target="_new">this
reference</a> for more details). Lastly, if you populate your objects as in the example
below, you will notice that the original display of the combobox is populated with
the first item in the supplier list. If you scroll to the next record and then back
to the first record, the combobox will display properly. 
</p><p></p><pre><code> private void btnPopulate_Click(object sender, EventArgs e) { orderBindingSource.Add(new
Order(1, "Test1", null)); orderBindingSource.Add(new Order(2, "Test2", 1)); supplierBindingSource.Add(new
Supplier(1, "Supplier X")); supplierBindingSource.Add(new Supplier(2, "Supplier Y"));
} </code></pre><p>
There are a couple of ways to fix this behavior. First, you could just reverse the
order and populate the supplierBindingSource first. Alternatively, you can leave the
population order alone and just call ResetBindings() after you're done populating
all of the data. 
</p><p></p><pre><code> private void btnPopulate_Click(object sender, EventArgs e) { orderBindingSource.Add(new
Order(1, "Test1", null)); orderBindingSource.Add(new Order(2, "Test2", 1)); supplierBindingSource.Add(new
Supplier(1, "Supplier X")); supplierBindingSource.Add(new Supplier(2, "Supplier Y"));
orderBindingSource.ResetBindings(false); } </code></pre><p>
One other quick note. When you want to set the Order.SupplierID field to null, you
cannot write code like this: 
</p><p></p><pre><code> SupplierNameCombo.SelectedValue = null; </code></pre><p>
Instead, you can either set the SelectedIndex to -1, or (IMO) more elegantly, write
code like this: 
</p><p></p><pre><code> SupplierNameCombo.SelectedValue = DBNull.Value; </code></pre><img width="0" height="0" src="http://www.distribucon.com/blog/aggbug.ashx?id=1033" /></body>
      <title>.NET Lookup combobox data binding</title>
      <guid isPermaLink="false">http://www.distribucon.com/blog/PermaLink,guid,1033.aspx</guid>
      <link>http://www.distribucon.com/blog/NETLookupComboboxDataBinding.aspx</link>
      <pubDate>Wed, 05 Jul 2006 18:47:00 GMT</pubDate>
      <description>Time to confess: I'm a fan of data binding. I've loved it ever since Delphi 3 made it workable by introducing TClientDataset. It's powerful, but makes application code fairly simple. Yes, it can be - and often, is - abused when used incorrectly, but overall, it's a good concept.
&lt;p&gt;
I recently worked on getting data binding in a .NET 2.0 application to work with a
lookup combobox. The concept is pretty straight-forward (and very analogous to Delphi's
TDBLookupCombobox). Databinding in .NET is pretty impressive, and a step forward from
where Delphi currently is. For example, you can bind straight to business objects
as opposed to being required to consume database resources/components to complete
data binding. One big snag was in getting the lookup relationship to respect null
values properly. For example, assume you have 2 very simple classes, Order and Supplier,
that are bound via BindingSource components. Furthermore, assume you have your data
binding set up properly to have a ComboBox set with DataSource=orderBindingSource,
DisplayMember=Name, ValueMember=SupplierID, and nameComboBox.DataBindings.Add(new
Binding("SelectedValue", this.orderBindingSource, "SupplierID", true)); (see &lt;a href="http://www.softinsight.com/bnoyes/PermaLink.aspx?guid=54fc20d7-e1ad-407b-893b-11db0f3e7a2b" target="_new"&gt;this
reference&lt;/a&gt; or &lt;a href="http://www.windowsforms.net/Samples/Go%20To%20Market/Data%20Binding/DataBinding%20FAQ.doc" target="_new"&gt;this
reference&lt;/a&gt; for more details). Lastly, if you populate your objects as in the example
below, you will notice that the original display of the combobox is populated with
the first item in the supplier list. If you scroll to the next record and then back
to the first record, the combobox will display properly. 
&lt;p&gt;
&lt;pre&gt;&lt;code&gt; private void btnPopulate_Click(object sender, EventArgs e) { orderBindingSource.Add(new
Order(1, "Test1", null)); orderBindingSource.Add(new Order(2, "Test2", 1)); supplierBindingSource.Add(new
Supplier(1, "Supplier X")); supplierBindingSource.Add(new Supplier(2, "Supplier Y"));
} &lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;
There are a couple of ways to fix this behavior. First, you could just reverse the
order and populate the supplierBindingSource first. Alternatively, you can leave the
population order alone and just call ResetBindings() after you're done populating
all of the data. 
&lt;p&gt;
&lt;pre&gt;&lt;code&gt; private void btnPopulate_Click(object sender, EventArgs e) { orderBindingSource.Add(new
Order(1, "Test1", null)); orderBindingSource.Add(new Order(2, "Test2", 1)); supplierBindingSource.Add(new
Supplier(1, "Supplier X")); supplierBindingSource.Add(new Supplier(2, "Supplier Y"));
orderBindingSource.ResetBindings(false); } &lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;
One other quick note. When you want to set the Order.SupplierID field to null, you
cannot write code like this: 
&lt;p&gt;
&lt;pre&gt;&lt;code&gt; SupplierNameCombo.SelectedValue = null; &lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;
Instead, you can either set the SelectedIndex to -1, or (IMO) more elegantly, write
code like this: 
&lt;p&gt;
&lt;pre&gt;&lt;code&gt; SupplierNameCombo.SelectedValue = DBNull.Value; &lt;/code&gt;&lt;/pre&gt;
&lt;img width="0" height="0" src="http://www.distribucon.com/blog/aggbug.ashx?id=1033" /&gt;</description>
      <comments>http://www.distribucon.com/blog/CommentView,guid,1033.aspx</comments>
      <category>Delphi</category>
    </item>
    <item>
      <trackback:ping>http://www.distribucon.com/blog/Trackback.aspx?guid=1026</trackback:ping>
      <pingback:server>http://www.distribucon.com/blog/pingback.aspx</pingback:server>
      <pingback:target>http://www.distribucon.com/blog/PermaLink,guid,1026.aspx</pingback:target>
      <dc:creator />
      <wfw:comment>http://www.distribucon.com/blog/CommentView,guid,1026.aspx</wfw:comment>
      <wfw:commentRss>http://www.distribucon.com/blog/SyndicationService.asmx/GetEntryCommentsRss?guid=1026</wfw:commentRss>
      <slash:comments>3</slash:comments>
      <body xmlns="http://www.w3.org/1999/xhtml">I've been writing a lot of test cases and
projects in VS.NET lately. <i>(Ed note: No, this doesn't mean I've abandoned Delphi.
I still love Delphi, and use it as my full-time tool. However, I always have - and
always will - keep abreast on the entire world of development tools.)</i> One thing
that I thought would be cool to have would be a simple expert - or "addin", in VS.NET
parlance - to ZIP up all of the source files automatically. I thought this would be
a good opportunity to learn about the addin framework for VS.NET, but like a good
developer, I thought I'd check to see if anyone else has written this already. In
short order, I found an article detailing <a href="http://www.codeproject.com/csharp/zipstudio.asp" target="_new">a
tool named ZIPStudio</a>. That article also provides source and a setup msi file to
install the addin, but it only works for older versions of VS.NET. A few clicks later,
I found the author's web site with <a href="http://www.geekswithblogs.net/willemf/archive/2005/11/24/61119.aspx" target="_new">an
update of ZIPStudio that will work in VS.NET 2005</a>. 
<p>
After installing the tool, and testing it on a few solutions, it appears to be exactly
what I was after. Highly recommended for those of you who want to move project source
around between machines.<img width="0" height="0" src="http://www.distribucon.com/blog/aggbug.ashx?id=1026" /></p></body>
      <title>ZIP files in solution</title>
      <guid isPermaLink="false">http://www.distribucon.com/blog/PermaLink,guid,1026.aspx</guid>
      <link>http://www.distribucon.com/blog/ZIPFilesInSolution.aspx</link>
      <pubDate>Wed, 28 Jun 2006 14:47:00 GMT</pubDate>
      <description>I've been writing a lot of test cases and projects in VS.NET lately. &lt;i&gt;(Ed note:
No, this doesn't mean I've abandoned Delphi. I still love Delphi, and use it as my
full-time tool. However, I always have - and always will - keep abreast on the entire
world of development tools.)&lt;/i&gt; One thing that I thought would be cool to have would
be a simple expert - or "addin", in VS.NET parlance - to ZIP up all of the source
files automatically. I thought this would be a good opportunity to learn about the
addin framework for VS.NET, but like a good developer, I thought I'd check to see
if anyone else has written this already. In short order, I found an article detailing &lt;a href="http://www.codeproject.com/csharp/zipstudio.asp" target="_new"&gt;a
tool named ZIPStudio&lt;/a&gt;. That article also provides source and a setup msi file to
install the addin, but it only works for older versions of VS.NET. A few clicks later,
I found the author's web site with &lt;a href="http://www.geekswithblogs.net/willemf/archive/2005/11/24/61119.aspx" target="_new"&gt;an
update of ZIPStudio that will work in VS.NET 2005&lt;/a&gt;. 
&lt;p&gt;
After installing the tool, and testing it on a few solutions, it appears to be exactly
what I was after. Highly recommended for those of you who want to move project source
around between machines.&lt;img width="0" height="0" src="http://www.distribucon.com/blog/aggbug.ashx?id=1026" /&gt;</description>
      <comments>http://www.distribucon.com/blog/CommentView,guid,1026.aspx</comments>
      <category>Delphi</category>
    </item>
    <item>
      <trackback:ping>http://www.distribucon.com/blog/Trackback.aspx?guid=1007</trackback:ping>
      <pingback:server>http://www.distribucon.com/blog/pingback.aspx</pingback:server>
      <pingback:target>http://www.distribucon.com/blog/PermaLink,guid,1007.aspx</pingback:target>
      <dc:creator />
      <wfw:comment>http://www.distribucon.com/blog/CommentView,guid,1007.aspx</wfw:comment>
      <wfw:commentRss>http://www.distribucon.com/blog/SyndicationService.asmx/GetEntryCommentsRss?guid=1007</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">OK, so it doesn't have the same ring as
Eminem's song, but it is accurate. :-) I was going through some of the older sections
of my hard drive looking to reorganize and cleanup unwanted files. While I was doing
that, I came across a project, TerraService, that I did ages ago. To the best of my
recollection, it may have been ported from a VB application that I found somewhere
on MSDN, but a search on that site isn't turning up any positive hits. Sorry for any
lack of proper attribution. If this was written by someone else in another language,
let me know, and I'll give the proper credit. 
<p>
The reason I'm <a href="http://www.distribucon.com/download/terraservice.zip" target="_new">making
the Delphi source available</a> is that it shows how Delphi has improved over the
years. I originally wrote this application using Delphi 6. As a result, I had to manually
deal with the TByteDynArray types to decode them from base64 before display. Using
Delphi 2006, this is no longer necessary - the types come back decoded and in usable
fashion without any extra work on your part. This sample shows several interesting
concepts: stream to variant conversion, drawing tiled images, calling a webservice,
dealing with GIF and JPG files, and interception of webservice traffic for debugging. 
</p><p>
While I don't know which specific version of Delphi fixes the TByteDynArray/Base64
de/encoding, this much I know for certain: Delphi 2006 makes web services very easy
to do.<img width="0" height="0" src="http://www.distribucon.com/blog/aggbug.ashx?id=1007" /></p></body>
      <title>Cleaning out my Hard Drive</title>
      <guid isPermaLink="false">http://www.distribucon.com/blog/PermaLink,guid,1007.aspx</guid>
      <link>http://www.distribucon.com/blog/CleaningOutMyHardDrive.aspx</link>
      <pubDate>Tue, 20 Jun 2006 20:06:00 GMT</pubDate>
      <description>OK, so it doesn't have the same ring as Eminem's song, but it is accurate. :-) I was going through some of the older sections of my hard drive looking to reorganize and cleanup unwanted files. While I was doing that, I came across a project, TerraService, that I did ages ago. To the best of my recollection, it may have been ported from a VB application that I found somewhere on MSDN, but a search on that site isn't turning up any positive hits. Sorry for any lack of proper attribution. If this was written by someone else in another language, let me know, and I'll give the proper credit.
&lt;p&gt;
The reason I'm &lt;a href="http://www.distribucon.com/download/terraservice.zip" target="_new"&gt;making
the Delphi source available&lt;/a&gt; is that it shows how Delphi has improved over the
years. I originally wrote this application using Delphi 6. As a result, I had to manually
deal with the TByteDynArray types to decode them from base64 before display. Using
Delphi 2006, this is no longer necessary - the types come back decoded and in usable
fashion without any extra work on your part. This sample shows several interesting
concepts: stream to variant conversion, drawing tiled images, calling a webservice,
dealing with GIF and JPG files, and interception of webservice traffic for debugging. 
&lt;p&gt;
While I don't know which specific version of Delphi fixes the TByteDynArray/Base64
de/encoding, this much I know for certain: Delphi 2006 makes web services very easy
to do.&lt;img width="0" height="0" src="http://www.distribucon.com/blog/aggbug.ashx?id=1007" /&gt;</description>
      <comments>http://www.distribucon.com/blog/CommentView,guid,1007.aspx</comments>
      <category>Delphi</category>
    </item>
    <item>
      <trackback:ping>http://www.distribucon.com/blog/Trackback.aspx?guid=989</trackback:ping>
      <pingback:server>http://www.distribucon.com/blog/pingback.aspx</pingback:server>
      <pingback:target>http://www.distribucon.com/blog/PermaLink,guid,989.aspx</pingback:target>
      <dc:creator />
      <wfw:comment>http://www.distribucon.com/blog/CommentView,guid,989.aspx</wfw:comment>
      <wfw:commentRss>http://www.distribucon.com/blog/SyndicationService.asmx/GetEntryCommentsRss?guid=989</wfw:commentRss>
      <slash:comments>4</slash:comments>
      <body xmlns="http://www.w3.org/1999/xhtml">I've been writing a .NET client application
that must upload a file to a IBM WebSphere (Java) server. This journey was met with
mis-steps all over the place. For starters, it looked like the WebClient class was
what I wanted, but it turns out you can't POST both a file and HTML form variables.
That meant that I needed to go to the low-level class, HttpWebRequest, to get this
done. There is code on google that got me most of the way there, but the web server
always ended up rejecting the submission with errors. To make matters worse, I don't
own the web server, so support on exactly what was wrong was extremely limited. 
<p>
Then I stumbled across a paper, <a href="http://www.west-wind.com/presentations/dotnetWebRequest/dotnetWebRequest.htm" target="_new">Retrieving
HTTP content in .NET</a> by Rick Strahl. In that paper, Rick ends up writing a very
nice wrapper class to deal with all of the details for you. I put together a test
case to try this out, and the amount of code I had to write dropped from 123 lines
down to 15. The new code even works with WebSphere. What's more, the wrapper class
provides a very nice model for programming applications that need to communicate via
HTTP. In my opinion, this is what Microsoft should have delivered with the framework,
as opposed to making people write their own wrapper or find Rick's code (which was
last updated in 2002, yet still works great). 
</p><p>
I made 2 changes to Rick's base class:<br /></p><ul><li>
I changed the cMultiPartBoundary variable to look like this in order to give a unique
boundary marker: string cMultiPartBoundary = "-----------------------------" + DateTime.Now.Ticks.ToString("x"); 
</li><li>
In the method GetUrlStream, there is a place where the end boundary marker is written
to the stream. However, according to the RFC on uploading files via POST, you need
to have 2 trailing dashes to mark the last end. I added those dashes like this: this.oPostData.Write(Encoding.GetEncoding(1252).GetBytes(
"--" + this.cMultiPartBoundary + "--\r\n" ) ); 
</li></ul><p>
I am one happy camper. I've done this very thing with other web applications in Delphi
before, and with the Indy components, it was very easy. Now with Rick's wrapper class,
it's easy to do the same kind of thing in .NET.<img width="0" height="0" src="http://www.distribucon.com/blog/aggbug.ashx?id=989" /></p></body>
      <title>POST a file to a web server</title>
      <guid isPermaLink="false">http://www.distribucon.com/blog/PermaLink,guid,989.aspx</guid>
      <link>http://www.distribucon.com/blog/POSTAFileToAWebServer.aspx</link>
      <pubDate>Tue, 30 May 2006 17:32:00 GMT</pubDate>
      <description>I've been writing a .NET client application that must upload a file to a IBM WebSphere (Java) server. This journey was met with mis-steps all over the place. For starters, it looked like the WebClient class was what I wanted, but it turns out you can't POST both a file and HTML form variables. That meant that I needed to go to the low-level class, HttpWebRequest, to get this done. There is code on google that got me most of the way there, but the web server always ended up rejecting the submission with errors. To make matters worse, I don't own the web server, so support on exactly what was wrong was extremely limited. 
&lt;p&gt;
Then I stumbled across a paper, &lt;a href="http://www.west-wind.com/presentations/dotnetWebRequest/dotnetWebRequest.htm" target="_new"&gt;Retrieving
HTTP content in .NET&lt;/a&gt; by Rick Strahl. In that paper, Rick ends up writing a very
nice wrapper class to deal with all of the details for you. I put together a test
case to try this out, and the amount of code I had to write dropped from 123 lines
down to 15. The new code even works with WebSphere. What's more, the wrapper class
provides a very nice model for programming applications that need to communicate via
HTTP. In my opinion, this is what Microsoft should have delivered with the framework,
as opposed to making people write their own wrapper or find Rick's code (which was
last updated in 2002, yet still works great). 
&lt;p&gt;
I made 2 changes to Rick's base class:&lt;br&gt;
&lt;ul&gt;
&lt;li&gt;
I changed the cMultiPartBoundary variable to look like this in order to give a unique
boundary marker: string cMultiPartBoundary = "-----------------------------" + DateTime.Now.Ticks.ToString("x"); 
&lt;li&gt;
In the method GetUrlStream, there is a place where the end boundary marker is written
to the stream. However, according to the RFC on uploading files via POST, you need
to have 2 trailing dashes to mark the last end. I added those dashes like this: this.oPostData.Write(Encoding.GetEncoding(1252).GetBytes(
"--" + this.cMultiPartBoundary + "--\r\n" ) ); 
&lt;/ul&gt;
&lt;p&gt;
I am one happy camper. I've done this very thing with other web applications in Delphi
before, and with the Indy components, it was very easy. Now with Rick's wrapper class,
it's easy to do the same kind of thing in .NET.&lt;img width="0" height="0" src="http://www.distribucon.com/blog/aggbug.ashx?id=989" /&gt;</description>
      <comments>http://www.distribucon.com/blog/CommentView,guid,989.aspx</comments>
      <category>Delphi</category>
    </item>
    <item>
      <trackback:ping>http://www.distribucon.com/blog/Trackback.aspx?guid=966</trackback:ping>
      <pingback:server>http://www.distribucon.com/blog/pingback.aspx</pingback:server>
      <pingback:target>http://www.distribucon.com/blog/PermaLink,guid,966.aspx</pingback:target>
      <dc:creator />
      <wfw:comment>http://www.distribucon.com/blog/CommentView,guid,966.aspx</wfw:comment>
      <wfw:commentRss>http://www.distribucon.com/blog/SyndicationService.asmx/GetEntryCommentsRss?guid=966</wfw:commentRss>
      <slash:comments>3</slash:comments>
      <body xmlns="http://www.w3.org/1999/xhtml">While ActiveX has enjoyed a (mostly) deserved
reputation for being ill-tempered and hard to work with, I've used it successfully
for many years as a deployment vehicle for rich-client web applications that run inside
the context of IE. I'll attribute most of that success to Delphi and ActiveForms since
the most complicated plumbing is taken care of for me automatically, but still gives
me the ability to override what I need. Special thanks should go to Lino Tadros and <a href="http://blogs.msdn.com/texblog/default.aspx" target="_new">Steve
Teixeira</a>, former members of the Delphi R&amp;D team, to allow this. 
<p>
Fast forward to today. My goal is relatively simple. I have a .NET application built
with WinForms. I'd like the same type of ease of use in deploying this WinForm application
to my users. I've done quite a bit of research on the best way to achieve this, but
I haven't come up with the perfect solution yet. I'm close, but it's not buttoned
up all of the way yet. For starters, I would highly recommend the following articles: 
<br /></p><ul><li><a href="http://samples.gotdotnet.com/quickstart/winforms/doc/WinFormsIeSourcing.aspx" target="_new">Using
Windows Forms Controls in Internet Explorer</a> has a good overview of how to get
a UserControl hosted in .NET 
</li><li><a href="http://msdn.microsoft.com/msdnmag/issues/02/06/Rich/" target="_new">Code
Access Security and Distribution Features in .NET Enhance Client-Side Apps</a> is
a very complete article about hosting in IE. It talks about how to host an EXE, and
gives some troubleshooting advice, including the fact that trying to host a WinForm
(as opposed to a Control) will not work. :-( 
</li><li><a href="http://www.fawcette.com/vsm/2002_09/magazine/columns/desktopdeveloper/default_pf.aspx" target="_new">Deploy
WinForms on the Web</a> is a brief overview with some overlap, but has some good information. 
</li><li><a href="http://msdn.microsoft.com/msdnmag/issues/02/07/NetSmartClients/" target="_new">Security
and Versioning Models in the Windows Forms Engine Help You Create and Deploy Smart
Clients</a> talks about how to deal with versioning, security, permissions, etc. 
</li></ul><p>
I wasn't able to find this nugget anywhere, though. If you want to call methods from
your HTML page via (e.g.) JScript, you need to make your EXE assembly COM visible.
The easiest way to do this is to select Properties for the EXE in the Project Manager,
and press Assembly Information. There, you'll find a checkbox to make this assembly
COM visible. 
</p><p>
So far, I've been able to get a WinForm EXE hosted in IE, strong-name it and communicate
from the web page to the control. I still have several items left to tackle, like
wrapping everything up in a CAB file for easier deployment, and getting calls to other
assemblies working. I'll comment on those as I get to them, but if you have any pointers
on better ways to do any of this, I'm all ears!<img width="0" height="0" src="http://www.distribucon.com/blog/aggbug.ashx?id=966" /></p></body>
      <title>Hosted WinForm in IE</title>
      <guid isPermaLink="false">http://www.distribucon.com/blog/PermaLink,guid,966.aspx</guid>
      <link>http://www.distribucon.com/blog/HostedWinFormInIE.aspx</link>
      <pubDate>Fri, 12 May 2006 20:29:00 GMT</pubDate>
      <description>While ActiveX has enjoyed a (mostly) deserved reputation for being ill-tempered and hard to work with, I've used it successfully for many years as a deployment vehicle for rich-client web applications that run inside the context of IE. I'll attribute most of that success to Delphi and ActiveForms since the most complicated plumbing is taken care of for me automatically, but still gives me the ability to override what I need. Special thanks should go to Lino Tadros and &lt;a href="http://blogs.msdn.com/texblog/default.aspx" target="_new"&gt;Steve
Teixeira&lt;/a&gt;, former members of the Delphi R&amp;amp;D team, to allow this. 
&lt;p&gt;
Fast forward to today. My goal is relatively simple. I have a .NET application built
with WinForms. I'd like the same type of ease of use in deploying this WinForm application
to my users. I've done quite a bit of research on the best way to achieve this, but
I haven't come up with the perfect solution yet. I'm close, but it's not buttoned
up all of the way yet. For starters, I would highly recommend the following articles: 
&lt;br&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;a href="http://samples.gotdotnet.com/quickstart/winforms/doc/WinFormsIeSourcing.aspx" target="_new"&gt;Using
Windows Forms Controls in Internet Explorer&lt;/a&gt; has a good overview of how to get
a UserControl hosted in .NET 
&lt;li&gt;
&lt;a href="http://msdn.microsoft.com/msdnmag/issues/02/06/Rich/" target="_new"&gt;Code
Access Security and Distribution Features in .NET Enhance Client-Side Apps&lt;/a&gt; is
a very complete article about hosting in IE. It talks about how to host an EXE, and
gives some troubleshooting advice, including the fact that trying to host a WinForm
(as opposed to a Control) will not work. :-( 
&lt;li&gt;
&lt;a href="http://www.fawcette.com/vsm/2002_09/magazine/columns/desktopdeveloper/default_pf.aspx" target="_new"&gt;Deploy
WinForms on the Web&lt;/a&gt; is a brief overview with some overlap, but has some good information. 
&lt;li&gt;
&lt;a href="http://msdn.microsoft.com/msdnmag/issues/02/07/NetSmartClients/" target="_new"&gt;Security
and Versioning Models in the Windows Forms Engine Help You Create and Deploy Smart
Clients&lt;/a&gt; talks about how to deal with versioning, security, permissions, etc. 
&lt;/ul&gt;
&lt;p&gt;
I wasn't able to find this nugget anywhere, though. If you want to call methods from
your HTML page via (e.g.) JScript, you need to make your EXE assembly COM visible.
The easiest way to do this is to select Properties for the EXE in the Project Manager,
and press Assembly Information. There, you'll find a checkbox to make this assembly
COM visible. 
&lt;p&gt;
So far, I've been able to get a WinForm EXE hosted in IE, strong-name it and communicate
from the web page to the control. I still have several items left to tackle, like
wrapping everything up in a CAB file for easier deployment, and getting calls to other
assemblies working. I'll comment on those as I get to them, but if you have any pointers
on better ways to do any of this, I'm all ears!&lt;img width="0" height="0" src="http://www.distribucon.com/blog/aggbug.ashx?id=966" /&gt;</description>
      <comments>http://www.distribucon.com/blog/CommentView,guid,966.aspx</comments>
      <category>Delphi</category>
    </item>
    <item>
      <trackback:ping>http://www.distribucon.com/blog/Trackback.aspx?guid=935</trackback:ping>
      <pingback:server>http://www.distribucon.com/blog/pingback.aspx</pingback:server>
      <pingback:target>http://www.distribucon.com/blog/PermaLink,guid,935.aspx</pingback:target>
      <dc:creator />
      <wfw:comment>http://www.distribucon.com/blog/CommentView,guid,935.aspx</wfw:comment>
      <wfw:commentRss>http://www.distribucon.com/blog/SyndicationService.asmx/GetEntryCommentsRss?guid=935</wfw:commentRss>
      <slash:comments>3</slash:comments>
      <body xmlns="http://www.w3.org/1999/xhtml">Someone on the newsgroups posted a linke
to <a href="http://www.campwoodsw.com/sm20.html" target="_new">SourceMonitor</a>.
It is a tool that analyzes source code (Delphi, C++, C#, Java, VB, C, and HTML) and
reports on various code metrics, like the number of lines of code, average statements
per method, methods per class, depth of method, global routines and variables, <a href="http://www.boyet.com/Articles/CyclomaticComplexity.html" target="_new">cyclomatic
complexity</a> of a method and tons more. The charts are incredible (Kiviat graphs
that are configurable with tolerance levels), and you can drill down and sort by any
criteria. By doing this, you can identify methods that need to be refactored. In addition,
you can View Source on the details and get buttons to take you straight to various
offending code metrics (max depth, max complexity method, etc.). The detail view also
shows graphs and more information about each unit. Lastly, you can take multiple snapshots
so you can monitor progress of your source code's health over time. 
<p>
This tool is listed as being freeware, but this is one instance where you get <b>WAY</b> more
than you pay for. <img width="0" height="0" src="http://www.distribucon.com/blog/aggbug.ashx?id=935" /></p></body>
      <title>SourceMonitor</title>
      <guid isPermaLink="false">http://www.distribucon.com/blog/PermaLink,guid,935.aspx</guid>
      <link>http://www.distribucon.com/blog/SourceMonitor.aspx</link>
      <pubDate>Tue, 21 Feb 2006 19:04:00 GMT</pubDate>
      <description>Someone on the newsgroups posted a linke to &lt;a href="http://www.campwoodsw.com/sm20.html" target="_new"&gt;SourceMonitor&lt;/a&gt;.
It is a tool that analyzes source code (Delphi, C++, C#, Java, VB, C, and HTML) and
reports on various code metrics, like the number of lines of code, average statements
per method, methods per class, depth of method, global routines and variables, &lt;a href="http://www.boyet.com/Articles/CyclomaticComplexity.html" target="_new"&gt;cyclomatic
complexity&lt;/a&gt; of a method and tons more. The charts are incredible (Kiviat graphs
that are configurable with tolerance levels), and you can drill down and sort by any
criteria. By doing this, you can identify methods that need to be refactored. In addition,
you can View Source on the details and get buttons to take you straight to various
offending code metrics (max depth, max complexity method, etc.). The detail view also
shows graphs and more information about each unit. Lastly, you can take multiple snapshots
so you can monitor progress of your source code's health over time. 
&lt;p&gt;
This tool is listed as being freeware, but this is one instance where you get &lt;b&gt;WAY&lt;/b&gt; more
than you pay for. &lt;img width="0" height="0" src="http://www.distribucon.com/blog/aggbug.ashx?id=935" /&gt;</description>
      <comments>http://www.distribucon.com/blog/CommentView,guid,935.aspx</comments>
      <category>Delphi</category>
    </item>
    <item>
      <trackback:ping>http://www.distribucon.com/blog/Trackback.aspx?guid=929</trackback:ping>
      <pingback:server>http://www.distribucon.com/blog/pingback.aspx</pingback:server>
      <pingback:target>http://www.distribucon.com/blog/PermaLink,guid,929.aspx</pingback:target>
      <dc:creator />
      <wfw:comment>http://www.distribucon.com/blog/CommentView,guid,929.aspx</wfw:comment>
      <wfw:commentRss>http://www.distribucon.com/blog/SyndicationService.asmx/GetEntryCommentsRss?guid=929</wfw:commentRss>
      <slash:comments>4</slash:comments>
      <body xmlns="http://www.w3.org/1999/xhtml">SmartInspect is a new logging tool published
by <a href="http://www.gurock.com" target="_new">Gurock Software</a>. This tool works
with Delphi (including BDS2006), .NET and Java applications. 
<p>
By adding some simple code to your application, you can get SmartInspect to keep track
of the logging in a meaningful way (by process, thread, method, session, etc.). Log
events that are "children" of other events can be rolled up and grouped to allow you
to focus precisely on what you're interested in. Logging can be done via file or TCP/IP,
so you can coordinate log messages from multiple machines. Source code is included
for the objects that SmartInspect uses, and you can extend the objects to do whatever
you dream up (filter packets, automatically colorize certain events, etc.). You can
even install Code Snippets/Templates into the IDE that you use. There are many more
features than this, but those are the ones that really stood out for me. 
</p><p>
I would highly recommend this product. This company has gone from nothing to having
one of the most professional product experiences I have ever seen. They have a very
complete, nice-looking, and easily navigable web site; incredibly great documentation
(both in general and for developers); trial versions; multiple support options (forum,
knowledge base, and email); a <a href="http://software.gurock.com/feeds/postings.rss" target="_new">blog</a>;
walk through samples; and an extremely well-polished user interface. I wish all companies
came on to the scene with such a thorough attention to detail. 
</p><p>
In short, great job guys. I look forward to using this product more as time passes. <img width="0" height="0" src="http://www.distribucon.com/blog/aggbug.ashx?id=929" /></p></body>
      <title>SmartInspect review</title>
      <guid isPermaLink="false">http://www.distribucon.com/blog/PermaLink,guid,929.aspx</guid>
      <link>http://www.distribucon.com/blog/SmartInspectReview.aspx</link>
      <pubDate>Fri, 17 Feb 2006 20:33:00 GMT</pubDate>
      <description>SmartInspect is a new logging tool published by &lt;a href="http://www.gurock.com" target="_new"&gt;Gurock
Software&lt;/a&gt;. This tool works with Delphi (including BDS2006), .NET and Java applications. 
&lt;p&gt;
By adding some simple code to your application, you can get SmartInspect to keep track
of the logging in a meaningful way (by process, thread, method, session, etc.). Log
events that are "children" of other events can be rolled up and grouped to allow you
to focus precisely on what you're interested in. Logging can be done via file or TCP/IP,
so you can coordinate log messages from multiple machines. Source code is included
for the objects that SmartInspect uses, and you can extend the objects to do whatever
you dream up (filter packets, automatically colorize certain events, etc.). You can
even install Code Snippets/Templates into the IDE that you use. There are many more
features than this, but those are the ones that really stood out for me. 
&lt;p&gt;
I would highly recommend this product. This company has gone from nothing to having
one of the most professional product experiences I have ever seen. They have a very
complete, nice-looking, and easily navigable web site; incredibly great documentation
(both in general and for developers); trial versions; multiple support options (forum,
knowledge base, and email); a &lt;a href="http://software.gurock.com/feeds/postings.rss" target="_new"&gt;blog&lt;/a&gt;&gt;;
walk through samples; and an extremely well-polished user interface. I wish all companies
came on to the scene with such a thorough attention to detail. 
&lt;p&gt;
In short, great job guys. I look forward to using this product more as time passes. &lt;img width="0" height="0" src="http://www.distribucon.com/blog/aggbug.ashx?id=929" /&gt;</description>
      <comments>http://www.distribucon.com/blog/CommentView,guid,929.aspx</comments>
      <category>Delphi</category>
    </item>
    <item>
      <trackback:ping>http://www.distribucon.com/blog/Trackback.aspx?guid=919</trackback:ping>
      <pingback:server>http://www.distribucon.com/blog/pingback.aspx</pingback:server>
      <pingback:target>http://www.distribucon.com/blog/PermaLink,guid,919.aspx</pingback:target>
      <dc:creator />
      <wfw:comment>http://www.distribucon.com/blog/CommentView,guid,919.aspx</wfw:comment>
      <wfw:commentRss>http://www.distribucon.com/blog/SyndicationService.asmx/GetEntryCommentsRss?guid=919</wfw:commentRss>
      <slash:comments>2</slash:comments>
      <body xmlns="http://www.w3.org/1999/xhtml">Date: March 16th, 2006<br />
Time: 6:30pm - 9:00pm<br />
Cost: FREE!<br />
Location: <a href="http://marriott.com/property/mapandnearbyairports/default.mi?marshaCode=mkemw" target="_new">Marriot
West</a> in Pewaukee<br />
Driving Directions:"Former Highway 164 North" is now Highway F North. Or, just pay
attention and take Exit 295 (as they mention in the directions on the web page). 
<br />
What: John Kaster will be preseting the new features of BDS 2006, which includes Delphi,
C#, and C++ personalities. This release has been rock solid for us, so I imagine this
will be one of those must-upgrades for everyone who uses Borland products. Last year,
John raffled off 2 copies of BDS (one Architect, and one Pro) to give away because
we had good numbers, so be sure to get the word out if you want a chance for that
kind of give-away again. There should also be discount coupons available. There is
also typically good swag to be had, and the presentations John does is second to none. 
<p>
Please RSVP to dmiser@distribucon.com so we can start getting a head count to make
sure the room is sized appropriately. 
</p><p>
Scott Simonson was able to recover some of the mailing list that we used last year,
but I'm sure it's not complete. Please forward this link, or the upcoming email to
any interested Delphi, C#, or C++ developers and have them email me at dmiser@distribucon.com
to confirm attendance. 
</p><p>
For those that care, it's also listed in <a href="http://ec.borland.com/monthView.faces?t=1141749191843#" target="_new">EventCentral</a>.
</p><img width="0" height="0" src="http://www.distribucon.com/blog/aggbug.ashx?id=919" /></body>
      <title>BDS 2006 tour stop update</title>
      <guid isPermaLink="false">http://www.distribucon.com/blog/PermaLink,guid,919.aspx</guid>
      <link>http://www.distribucon.com/blog/BDS2006TourStopUpdate.aspx</link>
      <pubDate>Tue, 07 Feb 2006 16:47:00 GMT</pubDate>
      <description>Date: March 16th, 2006&lt;br&gt;
Time: 6:30pm - 9:00pm&lt;br&gt;
Cost: FREE!&lt;br&gt;
Location: &lt;a href="http://marriott.com/property/mapandnearbyairports/default.mi?marshaCode=mkemw" target=_new&gt;Marriot
West&lt;/a&gt; in Pewaukee&lt;br&gt;
Driving Directions:"Former Highway 164 North" is now Highway F North. Or, just pay
attention and take Exit 295 (as they mention in the directions on the web page). 
&lt;br&gt;
What: John Kaster will be preseting the new features of BDS 2006, which includes Delphi,
C#, and C++ personalities. This release has been rock solid for us, so I imagine this
will be one of those must-upgrades for everyone who uses Borland products. Last year,
John raffled off 2 copies of BDS (one Architect, and one Pro) to give away because
we had good numbers, so be sure to get the word out if you want a chance for that
kind of give-away again. There should also be discount coupons available. There is
also typically good swag to be had, and the presentations John does is second to none. 
&lt;p&gt;
Please RSVP to dmiser@distribucon.com so we can start getting a head count to make
sure the room is sized appropriately. 
&lt;p&gt;
Scott Simonson was able to recover some of the mailing list that we used last year,
but I'm sure it's not complete. Please forward this link, or the upcoming email to
any interested Delphi, C#, or C++ developers and have them email me at dmiser@distribucon.com
to confirm attendance. 
&lt;p&gt;
For those that care, it's also listed in &lt;a href="http://ec.borland.com/monthView.faces?t=1141749191843#" target=_new&gt;EventCentral&lt;/a&gt;.
&lt;/p&gt;
&lt;img width="0" height="0" src="http://www.distribucon.com/blog/aggbug.ashx?id=919" /&gt;</description>
      <comments>http://www.distribucon.com/blog/CommentView,guid,919.aspx</comments>
      <category>Delphi</category>
    </item>
    <item>
      <trackback:ping>http://www.distribucon.com/blog/Trackback.aspx?guid=910</trackback:ping>
      <pingback:server>http://www.distribucon.com/blog/pingback.aspx</pingback:server>
      <pingback:target>http://www.distribucon.com/blog/PermaLink,guid,910.aspx</pingback:target>
      <dc:creator />
      <wfw:comment>http://www.distribucon.com/blog/CommentView,guid,910.aspx</wfw:comment>
      <wfw:commentRss>http://www.distribucon.com/blog/SyndicationService.asmx/GetEntryCommentsRss?guid=910</wfw:commentRss>
      <slash:comments>8</slash:comments>
      <body xmlns="http://www.w3.org/1999/xhtml">I keep expecting ADO.NET to work as well
as Delphi 1 did 10 years ago with respect to data access, and as a result, my expectations
keep getting dashed. Of course, some things (like MIDAS) only materialized in Delphi
3, so that's a scant 8 years ago. :-( It seems that all of the collective wisdom in
the .NET world to remote data (via .NET Remoting or Web Services) consists of one
of 3 approaches, with zero tolerance for deviation. 
<p></p><ol><li>
The DataSet approach.Use 2 methods for each entity that you want to remote. For example,
you find numerous posts in google and references on MSDN where you need to call myAppServer.GetCustomer()
to get a DataSet and then call myAppServer.UpdateCustomer(DataSet ds) to update the
customer. Repeat this over and over and over again for each entity. 
</li><li>
The built-in serialization approach. Failing #1 above, people then start to tell you
to create true business objects. You just need to take all of the tables that you
use, create a bunch of objects, map the objects to the DB, and you're off and running.
You can also use frameworks like Rocky Lhotka's <a href="http://www.lhotka.net/ArticleIndex.aspx?area=CSLA .NET 20" target="_new">CSLA</a>. 
</li><li>
The ORM approach. ObjectSpaces has died, but that doesn't mean ORM is dead. There
are a variety of options here. To name a couple that range from free to commercial,
and vary in features: <a href="http://www.hibernate.org/343.html" target="_new">NHibernate</a>,
which is an open-source port of the Java persistence framework, Hibernate; and <a href="http://www.llblgen.com/defaultgeneric.aspx" target="_new">LLBlGen
Pro</a>. Of course, this means you need to buy into the framework you use. 
</li></ol><p>
However, what I really wanted was a way to remote <b>data</b>, and not worry about
the more OO-centric techniques at this point. As a result, I wrote a framework, DrTier,
to do just that. I now have it working the way I want in .NET. DataSets are streamed
between client and server, user code is minimal, the app servers are extensible, and
I'm able to take advantage of the best things that .NET has to offer. However, ADO.NET
is not among them. 
</p><p>
For example, if you have a stateless server, you cannot guarantee the SQL statement
that was used to Fill the DataSet will be the same when you get back to the app server
to update the data. I ended up using the DataSet.ExtendedProperties property to cache
the SQL select statement and pass it around between client and server. By doing this,
I can guarantee that I'm building the appropriate INSERT/UPDATE/DELETE SQL statements
(DML) when I need to update the DataSet. 
</p><p>
Speaking of which, ADO.NET wants you to create DML statements for every table. There
are countless posts and articles <a href="http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnadonet/html/commandbuilder.asp" target="_new">chastising
the use of CommandBuilder</a> (poor performance, unoptimized for MSSQL, etc.). Creating
your own DML statements at run-time is no picnic, even after we've solved the above
problem. If you get schema information based on your SELECT statement, you will see
that the types for each field are provider-specific. That means that you would need
to have some kind of mapping between provider-specific types and DbType, or find another
solution to parameterize your queries (dynamic type instantiation based on the string
types returned in GetSchemaTable comes to mind as one possibility). 
</p><p>
Another good lesson learned is that when using the Data Access Block, I have found
that I can't take advantage of most of the methods in that block because they aren't
customizable at all. You want a DataSet loaded with schema information? Good luck.
Now you're using Database.DbProviderFactory to create concrete classes like you do
in straight ADO.NET. The helper methods lack extensibility, so you're forced into
this pattern. Returning fully formed DbCommands that point to a shared DbConnection
isn't really even supported. You need to do that manually, too. 
</p><p>
I won't go in-depth on the other features I found lacking (unlike Delphi), like ProviderFlags,
UpdateMode, TFields, extensive events during reconciliation, robust error resolving
support, etc., etc., etc. It seems that ADO.NET forces you into a pattern, and if
you want to deviate from that pattern, you better be prepared to work. 
</p><p>
Yes, I have an ulterior motive. I want my app servers written in .NET, and I want
them to behave like MIDAS app servers so that I can call them from existing Delphi
Win32 clients. Next up, I will need to write the interop code to get things working
between MIDAS and DrTier. Once all of that is done, we can get our feet wet in .NET
without resorting to a complete and total rewrite on both the client and server. So
far, so good, but the finish line is a long way off, and I'm afraid ADO.NET will fight
me every step of the way.
</p><img width="0" height="0" src="http://www.distribucon.com/blog/aggbug.ashx?id=910" /></body>
      <title>ADO.NET falls short again</title>
      <guid isPermaLink="false">http://www.distribucon.com/blog/PermaLink,guid,910.aspx</guid>
      <link>http://www.distribucon.com/blog/ADONETFallsShortAgain.aspx</link>
      <pubDate>Fri, 03 Feb 2006 23:12:00 GMT</pubDate>
      <description>I keep expecting ADO.NET to work as well as Delphi 1 did 10 years ago with respect to data access, and as a result, my expectations keep getting dashed. Of course, some things (like MIDAS) only materialized in Delphi 3, so that's a scant 8 years ago. :-( It seems that all of the collective wisdom in the .NET world to remote data (via .NET Remoting or Web Services) consists of one of 3 approaches, with zero tolerance for deviation. 
&lt;p&gt;
&lt;ol&gt;
&lt;li&gt;
The DataSet approach.Use 2 methods for each entity that you want to remote. For example,
you find numerous posts in google and references on MSDN where you need to call myAppServer.GetCustomer()
to get a DataSet and then call myAppServer.UpdateCustomer(DataSet ds) to update the
customer. Repeat this over and over and over again for each entity. 
&lt;li&gt;
The built-in serialization approach. Failing #1 above, people then start to tell you
to create true business objects. You just need to take all of the tables that you
use, create a bunch of objects, map the objects to the DB, and you're off and running.
You can also use frameworks like Rocky Lhotka's &lt;a href="http://www.lhotka.net/ArticleIndex.aspx?area=CSLA .NET 20" target=_new&gt;CSLA&lt;/a&gt;. 
&lt;li&gt;
The ORM approach. ObjectSpaces has died, but that doesn't mean ORM is dead. There
are a variety of options here. To name a couple that range from free to commercial,
and vary in features: &lt;a href="http://www.hibernate.org/343.html" target=_new&gt;NHibernate&lt;/a&gt;,
which is an open-source port of the Java persistence framework, Hibernate; and &lt;a href="http://www.llblgen.com/defaultgeneric.aspx" target=_new&gt;LLBlGen
Pro&lt;/a&gt;. Of course, this means you need to buy into the framework you use. 
&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;
However, what I really wanted was a way to remote &lt;b&gt;data&lt;/b&gt;, and not worry about
the more OO-centric techniques at this point. As a result, I wrote a framework, DrTier,
to do just that. I now have it working the way I want in .NET. DataSets are streamed
between client and server, user code is minimal, the app servers are extensible, and
I'm able to take advantage of the best things that .NET has to offer. However, ADO.NET
is not among them. 
&lt;p&gt;
For example, if you have a stateless server, you cannot guarantee the SQL statement
that was used to Fill the DataSet will be the same when you get back to the app server
to update the data. I ended up using the DataSet.ExtendedProperties property to cache
the SQL select statement and pass it around between client and server. By doing this,
I can guarantee that I'm building the appropriate INSERT/UPDATE/DELETE SQL statements
(DML) when I need to update the DataSet. 
&lt;p&gt;
Speaking of which, ADO.NET wants you to create DML statements for every table. There
are countless posts and articles &lt;a href="http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnadonet/html/commandbuilder.asp" target=_new&gt;chastising
the use of CommandBuilder&lt;/a&gt; (poor performance, unoptimized for MSSQL, etc.). Creating
your own DML statements at run-time is no picnic, even after we've solved the above
problem. If you get schema information based on your SELECT statement, you will see
that the types for each field are provider-specific. That means that you would need
to have some kind of mapping between provider-specific types and DbType, or find another
solution to parameterize your queries (dynamic type instantiation based on the string
types returned in GetSchemaTable comes to mind as one possibility). 
&lt;p&gt;
Another good lesson learned is that when using the Data Access Block, I have found
that I can't take advantage of most of the methods in that block because they aren't
customizable at all. You want a DataSet loaded with schema information? Good luck.
Now you're using Database.DbProviderFactory to create concrete classes like you do
in straight ADO.NET. The helper methods lack extensibility, so you're forced into
this pattern. Returning fully formed DbCommands that point to a shared DbConnection
isn't really even supported. You need to do that manually, too. 
&lt;p&gt;
I won't go in-depth on the other features I found lacking (unlike Delphi), like ProviderFlags,
UpdateMode, TFields, extensive events during reconciliation, robust error resolving
support, etc., etc., etc. It seems that ADO.NET forces you into a pattern, and if
you want to deviate from that pattern, you better be prepared to work. 
&lt;p&gt;
Yes, I have an ulterior motive. I want my app servers written in .NET, and I want
them to behave like MIDAS app servers so that I can call them from existing Delphi
Win32 clients. Next up, I will need to write the interop code to get things working
between MIDAS and DrTier. Once all of that is done, we can get our feet wet in .NET
without resorting to a complete and total rewrite on both the client and server. So
far, so good, but the finish line is a long way off, and I'm afraid ADO.NET will fight
me every step of the way.
&lt;/p&gt;
&lt;img width="0" height="0" src="http://www.distribucon.com/blog/aggbug.ashx?id=910" /&gt;</description>
      <comments>http://www.distribucon.com/blog/CommentView,guid,910.aspx</comments>
      <category>Delphi</category>
    </item>
    <item>
      <trackback:ping>http://www.distribucon.com/blog/Trackback.aspx?guid=878</trackback:ping>
      <pingback:server>http://www.distribucon.com/blog/pingback.aspx</pingback:server>
      <pingback:target>http://www.distribucon.com/blog/PermaLink,guid,878.aspx</pingback:target>
      <dc:creator />
      <wfw:comment>http://www.distribucon.com/blog/CommentView,guid,878.aspx</wfw:comment>
      <wfw:commentRss>http://www.distribucon.com/blog/SyndicationService.asmx/GetEntryCommentsRss?guid=878</wfw:commentRss>
      <slash:comments>5</slash:comments>
      <body xmlns="http://www.w3.org/1999/xhtml">As I alluded to in an <a href="http://distribucon.com/blog/archive/2006/01/12/872.aspx" target="_new">earlier
post</a>, I had troubles using the nz() function from a TADODataset in Delphi. Take
the following SQL, which works just fine in Access itself: 
<p></p><pre><code> SELECT DISTINCT ContestId, Hole, nz(Score,'MISSING') FROM tblContestDetails </code></pre><p>
This query behaves like isnull() in MSSQL where if the Score column is null, it returns
the value 'MISSING' instead. If Score isn't null, then the value of Score would be
returned. To me, this syntax is very intuitive, corresponds well with other DBMS'
isnull() functions, and clearly captures the intent of what you're trying to do in
once concise statement. However, if you put this query in a TADODataset and try to
open that dataset, you will be greeted with the following error: "Undefined function
'nz' in expression.". If you need this type of substitution in Access when executing
from Delphi, I found the simplest way to get around this is to use the iif() and isnull()
functions. It's more verbose, and I don't like it as much, but when you need things
to work, some times you have to live with things that aren't aesthetically pleasing.
The SQL above translates to this: 
</p><p></p><pre><code> SELECT DISTINCT ContestId, Hole, iif(isnull(Score),'MISSING', Score)
FROM tblContestDetails </code></pre><img width="0" height="0" src="http://www.distribucon.com/blog/aggbug.ashx?id=878" /></body>
      <title>Delphi dbGo error executing nz() function in Access SQL</title>
      <guid isPermaLink="false">http://www.distribucon.com/blog/PermaLink,guid,878.aspx</guid>
      <link>http://www.distribucon.com/blog/DelphiDbGoErrorExecutingNzFunctionInAccessSQL.aspx</link>
      <pubDate>Mon, 16 Jan 2006 15:12:00 GMT</pubDate>
      <description>As I alluded to in an &lt;a href="http://distribucon.com/blog/archive/2006/01/12/872.aspx" target="_new"&gt;earlier
post&lt;/a&gt;, I had troubles using the nz() function from a TADODataset in Delphi. Take
the following SQL, which works just fine in Access itself: 
&lt;p&gt;
&lt;pre&gt;&lt;code&gt; SELECT DISTINCT ContestId, Hole, nz(Score,'MISSING') FROM tblContestDetails &lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;
This query behaves like isnull() in MSSQL where if the Score column is null, it returns
the value 'MISSING' instead. If Score isn't null, then the value of Score would be
returned. To me, this syntax is very intuitive, corresponds well with other DBMS'
isnull() functions, and clearly captures the intent of what you're trying to do in
once concise statement. However, if you put this query in a TADODataset and try to
open that dataset, you will be greeted with the following error: "Undefined function
'nz' in expression.". If you need this type of substitution in Access when executing
from Delphi, I found the simplest way to get around this is to use the iif() and isnull()
functions. It's more verbose, and I don't like it as much, but when you need things
to work, some times you have to live with things that aren't aesthetically pleasing.
The SQL above translates to this: 
&lt;p&gt;
&lt;pre&gt;&lt;code&gt; SELECT DISTINCT ContestId, Hole, iif(isnull(Score),'MISSING', Score) FROM
tblContestDetails &lt;/code&gt;&lt;/pre&gt;&lt;img width="0" height="0" src="http://www.distribucon.com/blog/aggbug.ashx?id=878" /&gt;</description>
      <comments>http://www.distribucon.com/blog/CommentView,guid,878.aspx</comments>
      <category>Delphi</category>
    </item>
    <item>
      <trackback:ping>http://www.distribucon.com/blog/Trackback.aspx?guid=873</trackback:ping>
      <pingback:server>http://www.distribucon.com/blog/pingback.aspx</pingback:server>
      <pingback:target>http://www.distribucon.com/blog/PermaLink,guid,873.aspx</pingback:target>
      <dc:creator />
      <wfw:comment>http://www.distribucon.com/blog/CommentView,guid,873.aspx</wfw:comment>
      <wfw:commentRss>http://www.distribucon.com/blog/SyndicationService.asmx/GetEntryCommentsRss?guid=873</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <a href="http://delphi.wikicities.com/wiki/Delphi_Live_Templates" target="_new">This
link</a> is a wiki for Live Templates that you can install in your copy of Delphi.
If you come up with your own cool Live Templates, you can add them there, too.<img width="0" height="0" src="http://www.distribucon.com/blog/aggbug.ashx?id=873" /></body>
      <title>Live Templates wiki</title>
      <guid isPermaLink="false">http://www.distribucon.com/blog/PermaLink,guid,873.aspx</guid>
      <link>http://www.distribucon.com/blog/LiveTemplatesWiki.aspx</link>
      <pubDate>Thu, 12 Jan 2006 15:48:00 GMT</pubDate>
      <description>&lt;a href="http://delphi.wikicities.com/wiki/Delphi_Live_Templates" target="_new"&gt;This
link&lt;/a&gt; is a wiki for Live Templates that you can install in your copy of Delphi.
If you come up with your own cool Live Templates, you can add them there, too.&lt;img width="0" height="0" src="http://www.distribucon.com/blog/aggbug.ashx?id=873" /&gt;</description>
      <comments>http://www.distribucon.com/blog/CommentView,guid,873.aspx</comments>
      <category>Delphi</category>
    </item>
    <item>
      <trackback:ping>http://www.distribucon.com/blog/Trackback.aspx?guid=872</trackback:ping>
      <pingback:server>http://www.distribucon.com/blog/pingback.aspx</pingback:server>
      <pingback:target>http://www.distribucon.com/blog/PermaLink,guid,872.aspx</pingback:target>
      <dc:creator />
      <wfw:comment>http://www.distribucon.com/blog/CommentView,guid,872.aspx</wfw:comment>
      <wfw:commentRss>http://www.distribucon.com/blog/SyndicationService.asmx/GetEntryCommentsRss?guid=872</wfw:commentRss>
      <title>SQL: Consecutive occurences in data</title>
      <guid isPermaLink="false">http://www.distribucon.com/blog/PermaLink,guid,872.aspx</guid>
      <link>http://www.distribucon.com/blog/SQLConsecutiveOccurencesInData.aspx</link>
      <pubDate>Thu, 12 Jan 2006 15:03:00 GMT</pubDate>
      <description>I had a need to write SQL to answer the question "How many times in a row have I scored -20 or better?" in a game of &lt;a href="http://www.goldentee.com/GTLive/" target="_new"&gt;Golden
Tee&lt;/a&gt;. I have the raw data stored in a table that has these fields (and more, but
they aren't important to this exercise). 
&lt;p&gt;
&lt;pre&gt;&lt;code&gt; tblContestResults ContestId Long Integer Score Integer &lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;
I didn't want to use a cursor, and I wanted to stay as close to ANSI SQL as possible
(so no stored procs, etc.). After googling around a bit, I came across &lt;a href="http://groups.google.com/group/microsoft.public.sqlserver.programming/browse_frm/thread/ab572985cec15d32/f4e1087f18984fa0?lnk=st&amp;q=sql+consecutive+values&amp;rnum=4#f4e1087f18984fa0" target="_new"&gt;this
link&lt;/a&gt; that showed how to do this all in SQL using nested selects and virtual groups.
The sample was written to be compatible with MSSQL. After tweaking it just a bit,
I came to this solution, which works wonderfully. 
&lt;p&gt;
&lt;pre&gt;&lt;code&gt; SELECT Max(grpCnt) AS MaxRun FROM (Select grp, Count(*) As GrpCnt From
(Select A.ContestId, A.Score, Case When A.Score &amp;lt;= -20 Then Isnull( (Select Max(B.ContestId)
From tblContestResults As B Where B.ContestId &amp;lt; A.ContestId and B.Score&amp;gt;-20),
(Select Min(C.ContestId) from tblContestResults AS C) ) End As grp From tblContestResults
As A) As WithGrps Where grp Is Not Null Group By grp) AS WithGrpCnts; &lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;
You can take each of the nested selects out and break them apart to execute them in
order to see how the query is built up. Quite an interesting technique, and one that
I will definitely keep in my bag of tricks. For my purposes, I had to use MS Access,
so that meant I had to change things in the SQL a bit more since there is no "CASE
WHEN" in Access. The following is the code I ended up using, and it also works quite
well. I didn't use the nz() function because there is a problem in Delphi's TADODataset
when executing code that has that expression in it (more on that later). Using nz()
does work in Access, and makes the query easier to read, IMO. But if it doesn't work
in Delphi, then I can't use it. &lt;pre&gt;&lt;code&gt;&lt; A.ContestId and B.Score&amp;gt;-20))
        ,(Select Min(C.ContestId) from tblContestResults AS C)
        ,(Select Max(B.ContestId) From tblContestResults As B Where B.ContestId &lt; A.ContestId and B.Score&amp;gt;-20)
      )
  ,Null) AS grp
  FROM tblContestResults AS A
  ORDER BY ContestId) as WithGrps
WHERE grp is not null
GROUP BY grp) AS WithGrpCnts;
&lt;/code&gt; SELECT
MAX(grpCnt) AS MaxRun FROM (SELECT grp, Count(*) as GrpCnt FROM (SELECT A.ContestID,
A.Score, IIf(A.Score&amp;lt;=-20, IIf( isnull((Select Max(B.ContestId) From tblContestResults
As B Where B.ContestId 
&lt;/pre&gt;
&lt;img width="0" height="0" src="http://www.distribucon.com/blog/aggbug.ashx?id=872" /&gt;</description>
      <comments>http://www.distribucon.com/blog/CommentView,guid,872.aspx</comments>
      <category>Delphi</category>
    </item>
    <item>
      <trackback:ping>http://www.distribucon.com/blog/Trackback.aspx?guid=870</trackback:ping>
      <pingback:server>http://www.distribucon.com/blog/pingback.aspx</pingback:server>
      <pingback:target>http://www.distribucon.com/blog/PermaLink,guid,870.aspx</pingback:target>
      <dc:creator />
      <wfw:comment>http://www.distribucon.com/blog/CommentView,guid,870.aspx</wfw:comment>
      <wfw:commentRss>http://www.distribucon.com/blog/SyndicationService.asmx/GetEntryCommentsRss?guid=870</wfw:commentRss>
      <slash:comments>1</slash:comments>
      <body xmlns="http://www.w3.org/1999/xhtml">A while back, I posted a blog about <a href="http://distribucon.com/blog/archive/2004/10/20/310.aspx" target="_new">Delphi
having problems with running a COM server in a service under Win2003</a>. While the
work-around to make things work is fairly trivial, Borland has made things even easier
in Delphi 2006. Simply set Application.DelayInitialize to true in your dpr, and all
of the timing details will be taken care of for you automatically.<img width="0" height="0" src="http://www.distribucon.com/blog/aggbug.ashx?id=870" /></body>
      <title>D2006: SvcMgr.DelayInitialize</title>
      <guid isPermaLink="false">http://www.distribucon.com/blog/PermaLink,guid,870.aspx</guid>
      <link>http://www.distribucon.com/blog/D2006SvcMgrDelayInitialize.aspx</link>
      <pubDate>Wed, 11 Jan 2006 15:03:00 GMT</pubDate>
      <description>A while back, I posted a blog about &lt;a href="http://distribucon.com/blog/archive/2004/10/20/310.aspx" target="_new"&gt;Delphi
having problems with running a COM server in a service under Win2003&lt;/a&gt;. While the
work-around to make things work is fairly trivial, Borland has made things even easier
in Delphi 2006. Simply set Application.DelayInitialize to true in your dpr, and all
of the timing details will be taken care of for you automatically.&lt;img width="0" height="0" src="http://www.distribucon.com/blog/aggbug.ashx?id=870" /&gt;</description>
      <comments>http://www.distribucon.com/blog/CommentView,guid,870.aspx</comments>
      <category>Delphi</category>
    </item>
    <item>
      <trackback:ping>http://www.distribucon.com/blog/Trackback.aspx?guid=866</trackback:ping>
      <pingback:server>http://www.distribucon.com/blog/pingback.aspx</pingback:server>
      <pingback:target>http://www.distribucon.com/blog/PermaLink,guid,866.aspx</pingback:target>
      <dc:creator />
      <wfw:comment>http://www.distribucon.com/blog/CommentView,guid,866.aspx</wfw:comment>
      <wfw:commentRss>http://www.distribucon.com/blog/SyndicationService.asmx/GetEntryCommentsRss?guid=866</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">When importing data into Excel, the data
that you set will be treated as a Text cell by default. Dates in Excel are equivalent
to Delphi TDateTime in that they are a julian date and time is stored as a fraction
and share the same numeric equivalents after 3/1/1900 (integer value of 61). This
makes life very simple when writing date values to your worksheet since you just need
to write the TDateTime value to Excel and if you format the cell as a date, you get
the date/time in the worksheet. 
<p></p><pre><code><b>procedure</b> TForm1.Button1Click(Sender: TObject); <b>var</b> Excel,
Workbook, Worksheet: OleVariant; <b>begin</b> Excel := CreateOLEObject('Excel.Application'); <b>try</b> WorkBook
:= Excel.WorkBooks.Open('c:\temp\ws.xls'); WorkSheet := WorkBook.Worksheets.Item['Sheet1'];
WorkSheet.Range['A1', 'A1'].Value := Now; <b>finally</b> Excel.Quit; Worksheet :=
Unassigned; Workbook := Unassigned; Excel := Unassigned; <b>end</b>; <b>end</b>; </code></pre><img width="0" height="0" src="http://www.distribucon.com/blog/aggbug.ashx?id=866" /></body>
      <title>Excel import of dates</title>
      <guid isPermaLink="false">http://www.distribucon.com/blog/PermaLink,guid,866.aspx</guid>
      <link>http://www.distribucon.com/blog/ExcelImportOfDates.aspx</link>
      <pubDate>Tue, 10 Jan 2006 15:24:00 GMT</pubDate>
      <description>When importing data into Excel, the data that you set will be treated as a Text cell by default. Dates in Excel are equivalent to Delphi TDateTime in that they are a julian date and time is stored as a fraction and share the same numeric equivalents after 3/1/1900 (integer value of 61). This makes life very simple when writing date values to your worksheet since you just need to write the TDateTime value to Excel and if you format the cell as a date, you get the date/time in the worksheet.
&lt;p&gt;
&lt;pre&gt;&lt;code&gt; &lt;b&gt;procedure&lt;/b&gt; TForm1.Button1Click(Sender: TObject); &lt;b&gt;var&lt;/b&gt; Excel,
Workbook, Worksheet: OleVariant; &lt;b&gt;begin&lt;/b&gt; Excel := CreateOLEObject('Excel.Application'); &lt;b&gt;try&lt;/b&gt; WorkBook
:= Excel.WorkBooks.Open('c:\temp\ws.xls'); WorkSheet := WorkBook.Worksheets.Item['Sheet1'];
WorkSheet.Range['A1', 'A1'].Value := Now; &lt;b&gt;finally&lt;/b&gt; Excel.Quit; Worksheet :=
Unassigned; Workbook := Unassigned; Excel := Unassigned; &lt;b&gt;end&lt;/b&gt;; &lt;b&gt;end&lt;/b&gt;; &lt;/code&gt;&lt;/pre&gt;
&lt;img width="0" height="0" src="http://www.distribucon.com/blog/aggbug.ashx?id=866" /&gt;</description>
      <comments>http://www.distribucon.com/blog/CommentView,guid,866.aspx</comments>
      <category>Delphi</category>
    </item>
    <item>
      <trackback:ping>http://www.distribucon.com/blog/Trackback.aspx?guid=865</trackback:ping>
      <pingback:server>http://www.distribucon.com/blog/pingback.aspx</pingback:server>
      <pingback:target>http://www.distribucon.com/blog/PermaLink,guid,865.aspx</pingback:target>
      <dc:creator />
      <wfw:comment>http://www.distribucon.com/blog/CommentView,guid,865.aspx</wfw:comment>
      <wfw:commentRss>http://www.distribucon.com/blog/SyndicationService.asmx/GetEntryCommentsRss?guid=865</wfw:commentRss>
      <slash:comments>3</slash:comments>
      <body xmlns="http://www.w3.org/1999/xhtml">For quite some time, Delphi has allowed
custom FormatSettings to be used with many date/time functions. This allows you to
use custom date/time settings within an application without changing the Windows options.
For example, if you used this code snippet and had a date/time format like mm/dd/yyyy,
you would see the date/time reported in the new format instead:<br /><pre><code> procedure TForm3.Button1Click(Sender: TObject); var MySettings: TFormatSettings;
s: string; d: TDateTime; begin GetLocaleFormatSettings(GetUserDefaultLCID, MySettings);
MySettings.DateSeparator := '-'; MySettings.TimeSeparator := ':'; MySettings.ShortDateFormat
:= 'mm-dd-yyyy'; MySettings.ShortTimeFormat := 'hh:nn:ss'; s := DateTimeToStr(Now,
MySettings); ShowMessage(s); d := StrToDateTime(s, MySettings); ShowMessage(DateTimeToStr(d,
MySettings)); end; </code></pre><p>
However, if you used 'mmm-dd-yyyy' as the ShortDateFormat in the example above (to
display Jan-09-2006), you would get an error when calling StrToDateTime on this string.
The workaround is to call d := VarToDateTime(s) instead, since that function supports
month names when encoding the TDateTime. I logged this bug as <a href="http://qc.borland.com/wc/qcmain.aspx?d=23301" target="_new">QC
23301</a>, so if you'd like to see this fixed, please rate this entry and vote on
it if it's important enough to you.<img width="0" height="0" src="http://www.distribucon.com/blog/aggbug.ashx?id=865" /></p></body>
      <title>Delphi StrToDateTime with FormatSettings</title>
      <guid isPermaLink="false">http://www.distribucon.com/blog/PermaLink,guid,865.aspx</guid>
      <link>http://www.distribucon.com/blog/DelphiStrToDateTimeWithFormatSettings.aspx</link>
      <pubDate>Tue, 10 Jan 2006 02:08:00 GMT</pubDate>
      <description>For quite some time, Delphi has allowed custom FormatSettings to be used with many date/time functions. This allows you to use custom date/time settings within an application without changing the Windows options. For example, if you used this code snippet and had a date/time format like mm/dd/yyyy, you would see the date/time reported in the new format instead:&lt;br&gt;
&lt;pre&gt;&lt;code&gt; procedure TForm3.Button1Click(Sender: TObject); var MySettings: TFormatSettings;
s: string; d: TDateTime; begin GetLocaleFormatSettings(GetUserDefaultLCID, MySettings);
MySettings.DateSeparator := '-'; MySettings.TimeSeparator := ':'; MySettings.ShortDateFormat
:= 'mm-dd-yyyy'; MySettings.ShortTimeFormat := 'hh:nn:ss'; s := DateTimeToStr(Now,
MySettings); ShowMessage(s); d := StrToDateTime(s, MySettings); ShowMessage(DateTimeToStr(d,
MySettings)); end; &lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;
However, if you used 'mmm-dd-yyyy' as the ShortDateFormat in the example above (to
display Jan-09-2006), you would get an error when calling StrToDateTime on this string.
The workaround is to call d := VarToDateTime(s) instead, since that function supports
month names when encoding the TDateTime. I logged this bug as &lt;a href="http://qc.borland.com/wc/qcmain.aspx?d=23301" target="_new"&gt;QC
23301&lt;/a&gt;, so if you'd like to see this fixed, please rate this entry and vote on
it if it's important enough to you.&lt;img width="0" height="0" src="http://www.distribucon.com/blog/aggbug.ashx?id=865" /&gt;</description>
      <comments>http://www.distribucon.com/blog/CommentView,guid,865.aspx</comments>
      <category>Delphi</category>
    </item>
    <item>
      <trackback:ping>http://www.distribucon.com/blog/Trackback.aspx?guid=858</trackback:ping>
      <pingback:server>http://www.distribucon.com/blog/pingback.aspx</pingback:server>
      <pingback:target>http://www.distribucon.com/blog/PermaLink,guid,858.aspx</pingback:target>
      <dc:creator />
      <wfw:comment>http://www.distribucon.com/blog/CommentView,guid,858.aspx</wfw:comment>
      <wfw:commentRss>http://www.distribucon.com/blog/SyndicationService.asmx/GetEntryCommentsRss?guid=858</wfw:commentRss>
      <slash:comments>7</slash:comments>
      <body xmlns="http://www.w3.org/1999/xhtml">I've been using VNC, including countless
variants like UltraVNC and RealVNC, to access my home PC forever (OK, probably since
around 1997 or so, so for the purposes of computer lifespans, that easily constitutes
forever :-)). I even moderate a (not-so-active) open source project called <a href="http://sourceforge.net/projects/delphivnc" target="_new">DelphiVNC</a>.
However, I tried Remote Desktop recently, and I immediately switched to it. My reasons
for doing this were:<br /><ul><li>
Speed - RD seems <b>much</b> faster than VNC 
</li><li>
Easy file copy between systems 
</li><li>
Can stream remote sound to the local PC 
</li><li>
Easy to setup and configure 
</li><li>
Web access 
</li></ul><p>
Here are some of the links that I used to get things up and running:<br /></p><ul><li><a href="http://www.microsoft.com/technet/prodtechnol/winxppro/reskit/c08621675.mspx" target="_new">Good
general overview of features from MS</a></li><li><a href="http://support.microsoft.com/default.aspx?scid=kb;en-us;313292" target="_new">Getting
access to local files in an RD session</a></li><li><a href="http://www.microsoft.com/windowsxp/using/networking/expert/russel_02January14.mspx" target="_new">RD
Web Connection setup</a> will let you connect to the remote PC from the local PC via
IE. 
</li><li><a href="http://www.remotenetworktechnology.com/ow.asp?Remote%5FNetwork%5FHome%2FRemoteDesktop%2FFrequentlyAskedQuestionsPage#h23" target="_new">How
to use RD over SSH</a>. This is a good FAQ for other RD items, too. It appears that
as of XP SP2, you don't have to run in compatibility mode, at least as long as you
try to connect to another port (e.g. 127.0.0.1:3390). Step 9 in this documnet means
that you need to set up a SSH tunnel to forward from port 3390 to 3389. Pay close
attention to the fact that you need to logout, though. If you don't do that when ending
a session, you will need to reboot the remote PC to get RD working again. 
</li></ul><p>
If you go to a command prompt and type, "mstsc /?", you will see the different options
you can pass in. I set up a few different RD profiles by selecting the Options button,
filling out the details I wanted, and saving the profile. I then made shortcuts to
pass in the rdp file to let me get quick and easy access to the remote PC. 
</p><p>
Let me know how this works for you.<img width="0" height="0" src="http://www.distribucon.com/blog/aggbug.ashx?id=858" /></p></body>
      <title>Remote Desktop</title>
      <guid isPermaLink="false">http://www.distribucon.com/blog/PermaLink,guid,858.aspx</guid>
      <link>http://www.distribucon.com/blog/RemoteDesktop.aspx</link>
      <pubDate>Tue, 03 Jan 2006 20:07:00 GMT</pubDate>
      <description>I've been using VNC, including countless variants like UltraVNC and RealVNC, to access my home PC forever (OK, probably since around 1997 or so, so for the purposes of computer lifespans, that easily constitutes forever :-)). I even moderate a (not-so-active) open source project called &lt;a href="http://sourceforge.net/projects/delphivnc" target="_new"&gt;DelphiVNC&lt;/a&gt;.
However, I tried Remote Desktop recently, and I immediately switched to it. My reasons
for doing this were:&lt;br&gt;
&lt;ul&gt;
&lt;li&gt;
Speed - RD seems &lt;b&gt;much&lt;/b&gt; faster than VNC 
&lt;li&gt;
Easy file copy between systems 
&lt;li&gt;
Can stream remote sound to the local PC 
&lt;li&gt;
Easy to setup and configure 
&lt;li&gt;
Web access 
&lt;/ul&gt;
&lt;p&gt;
Here are some of the links that I used to get things up and running:&lt;br&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;a href="http://www.microsoft.com/technet/prodtechnol/winxppro/reskit/c08621675.mspx" target="_new"&gt;Good
general overview of features from MS&lt;/a&gt; 
&lt;li&gt;
&lt;a href="http://support.microsoft.com/default.aspx?scid=kb;en-us;313292" target="_new"&gt;Getting
access to local files in an RD session&lt;/a&gt; 
&lt;li&gt;
&lt;a href="http://www.microsoft.com/windowsxp/using/networking/expert/russel_02January14.mspx" target="_new"&gt;RD
Web Connection setup&lt;/a&gt; will let you connect to the remote PC from the local PC via
IE. 
&lt;li&gt;
&lt;a href="http://www.remotenetworktechnology.com/ow.asp?Remote%5FNetwork%5FHome%2FRemoteDesktop%2FFrequentlyAskedQuestionsPage#h23" target="_new"&gt;How
to use RD over SSH&lt;/a&gt;. This is a good FAQ for other RD items, too. It appears that
as of XP SP2, you don't have to run in compatibility mode, at least as long as you
try to connect to another port (e.g. 127.0.0.1:3390). Step 9 in this documnet means
that you need to set up a SSH tunnel to forward from port 3390 to 3389. Pay close
attention to the fact that you need to logout, though. If you don't do that when ending
a session, you will need to reboot the remote PC to get RD working again. 
&lt;/ul&gt;
&lt;p&gt;
If you go to a command prompt and type, "mstsc /?", you will see the different options
you can pass in. I set up a few different RD profiles by selecting the Options button,
filling out the details I wanted, and saving the profile. I then made shortcuts to
pass in the rdp file to let me get quick and easy access to the remote PC. 
&lt;p&gt;
Let me know how this works for you.&lt;img width="0" height="0" src="http://www.distribucon.com/blog/aggbug.ashx?id=858" /&gt;</description>
      <comments>http://www.distribucon.com/blog/CommentView,guid,858.aspx</comments>
      <category>Delphi</category>
    </item>
    <item>
      <trackback:ping>http://www.distribucon.com/blog/Trackback.aspx?guid=850</trackback:ping>
      <pingback:server>http://www.distribucon.com/blog/pingback.aspx</pingback:server>
      <pingback:target>http://www.distribucon.com/blog/PermaLink,guid,850.aspx</pingback:target>
      <dc:creator />
      <wfw:comment>http://www.distribucon.com/blog/CommentView,guid,850.aspx</wfw:comment>
      <wfw:commentRss>http://www.distribucon.com/blog/SyndicationService.asmx/GetEntryCommentsRss?guid=850</wfw:commentRss>
      <slash:comments>1</slash:comments>
      <body xmlns="http://www.w3.org/1999/xhtml">John Kaster announced that <a href="http://www.borland.com/downloads/registered/download_bds.html" target="_new">Update
1</a> for BDS 2006 is now available. This update is supposed to bring the C++ personality
out of preview mode, but since some of the files that changed are used by all personalities
(IDE, TLE, etc.), I imagine some slight positive benefit will occur in the Delphi
personalities as well.<img width="0" height="0" src="http://www.distribucon.com/blog/aggbug.ashx?id=850" /></body>
      <title>D2006 Update 1 is available</title>
      <guid isPermaLink="false">http://www.distribucon.com/blog/PermaLink,guid,850.aspx</guid>
      <link>http://www.distribucon.com/blog/D2006Update1IsAvailable.aspx</link>
      <pubDate>Fri, 16 Dec 2005 15:18:00 GMT</pubDate>
      <description>John Kaster announced that &lt;a href="http://www.borland.com/downloads/registered/download_bds.html" target="_new"&gt;Update
1&lt;/a&gt; for BDS 2006 is now available. This update is supposed to bring the C++ personality
out of preview mode, but since some of the files that changed are used by all personalities
(IDE, TLE, etc.), I imagine some slight positive benefit will occur in the Delphi
personalities as well.&lt;img width="0" height="0" src="http://www.distribucon.com/blog/aggbug.ashx?id=850" /&gt;</description>
      <comments>http://www.distribucon.com/blog/CommentView,guid,850.aspx</comments>
      <category>Delphi</category>
    </item>
    <item>
      <trackback:ping>http://www.distribucon.com/blog/Trackback.aspx?guid=841</trackback:ping>
      <pingback:server>http://www.distribucon.com/blog/pingback.aspx</pingback:server>
      <pingback:target>http://www.distribucon.com/blog/PermaLink,guid,841.aspx</pingback:target>
      <dc:creator />
      <wfw:comment>http://www.distribucon.com/blog/CommentView,guid,841.aspx</wfw:comment>
      <wfw:commentRss>http://www.distribucon.com/blog/SyndicationService.asmx/GetEntryCommentsRss?guid=841</wfw:commentRss>
      <slash:comments>3</slash:comments>
      <body xmlns="http://www.w3.org/1999/xhtml">Version 10.0.2151.25345 of midas.dll is
available on my web site at <a href="http://www.distribucon.com/midas.html" target="_new">http://www.distribucon.com/midas.html</a>. 
<p>
It should be backwards compatible with older Delphi versions. If you run into any
problems with this new version, I highly recommend that you enter the issue into <a href="http://qc.borland.com" target="_new">QC</a>.
MIDAS continues to get good bug fixes due in large part to people posting their issues
in QC. 
</p><p>
Have fun! <img width="0" height="0" src="http://www.distribucon.com/blog/aggbug.ashx?id=841" /></p></body>
      <title>D2006 midas.dll available</title>
      <guid isPermaLink="false">http://www.distribucon.com/blog/PermaLink,guid,841.aspx</guid>
      <link>http://www.distribucon.com/blog/D2006MidasdllAvailable.aspx</link>
      <pubDate>Wed, 14 Dec 2005 21:43:00 GMT</pubDate>
      <description>Version 10.0.2151.25345 of midas.dll is available on my web site at &lt;a href="http://www.distribucon.com/midas.html" target="_new"&gt;http://www.distribucon.com/midas.html&lt;/a&gt;. 
&lt;p&gt;
It should be backwards compatible with older Delphi versions. If you run into any
problems with this new version, I highly recommend that you enter the issue into &lt;a href="http://qc.borland.com" target="_new"&gt;QC&lt;/a&gt;.
MIDAS continues to get good bug fixes due in large part to people posting their issues
in QC. 
&lt;p&gt;
Have fun! &lt;img width="0" height="0" src="http://www.distribucon.com/blog/aggbug.ashx?id=841" /&gt;</description>
      <comments>http://www.distribucon.com/blog/CommentView,guid,841.aspx</comments>
      <category>Delphi</category>
    </item>
    <item>
      <trackback:ping>http://www.distribucon.com/blog/Trackback.aspx?guid=835</trackback:ping>
      <pingback:server>http://www.distribucon.com/blog/pingback.aspx</pingback:server>
      <pingback:target>http://www.distribucon.com/blog/PermaLink,guid,835.aspx</pingback:target>
      <dc:creator />
      <wfw:comment>http://www.distribucon.com/blog/CommentView,guid,835.aspx</wfw:comment>
      <wfw:commentRss>http://www.distribucon.com/blog/SyndicationService.asmx/GetEntryCommentsRss?guid=835</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">I'll leave the fun of the Big Feature Writeups
(e.g. Live Templates) to others in the blogoshpere that have already started to cover
some of the new features of Delphi 2006. Instead, I'll cover some of the more mundane,
but very useful new features of Delphi 2006. 
<p>
Method navigation is described in the "What's New in Developer Studio 2006" file like
this: "You can quickly navigate between methods in your source code using a series
of hotkeys". You use hotkeys like CTRL+ALT+Up-arrow and CTRL+ATL+Down-arrow to move
from one method to the next in a given unit. CTRL+ALT+Home and CTRL+ALT+End take you
to the first and last method - respectively - in the unit. There is also the concept
of Class Locking which will only let you navigate with those hotkeys within the current
class. The documentation on how to toggle this feature is incorrect, though. The correct
way to do this is to position your caret in the IDE somewhere in a class, then press
CTRL+Q, followed by just the letter L. After you have enabled class lock, you are
constrained to method navigation only within that class. 
</p><p>
Note: This worked for me with the IDE Classic editor setting. I'm not sure how it
works with other settings.<img width="0" height="0" src="http://www.distribucon.com/blog/aggbug.ashx?id=835" /></p></body>
      <title>D2006: Method Navigation</title>
      <guid isPermaLink="false">http://www.distribucon.com/blog/PermaLink,guid,835.aspx</guid>
      <link>http://www.distribucon.com/blog/D2006MethodNavigation.aspx</link>
      <pubDate>Wed, 07 Dec 2005 19:18:00 GMT</pubDate>
      <description>I'll leave the fun of the Big Feature Writeups (e.g. Live Templates) to others in the blogoshpere that have already started to cover some of the new features of Delphi 2006. Instead, I'll cover some of the more mundane, but very useful new features of Delphi 2006.
&lt;p&gt;
Method navigation is described in the "What's New in Developer Studio 2006" file like
this: "You can quickly navigate between methods in your source code using a series
of hotkeys". You use hotkeys like CTRL+ALT+Up-arrow and CTRL+ATL+Down-arrow to move
from one method to the next in a given unit. CTRL+ALT+Home and CTRL+ALT+End take you
to the first and last method - respectively - in the unit. There is also the concept
of Class Locking which will only let you navigate with those hotkeys within the current
class. The documentation on how to toggle this feature is incorrect, though. The correct
way to do this is to position your caret in the IDE somewhere in a class, then press
CTRL+Q, followed by just the letter L. After you have enabled class lock, you are
constrained to method navigation only within that class. 
&lt;p&gt;
Note: This worked for me with the IDE Classic editor setting. I'm not sure how it
works with other settings.&lt;img width="0" height="0" src="http://www.distribucon.com/blog/aggbug.ashx?id=835" /&gt;</description>
      <comments>http://www.distribucon.com/blog/CommentView,guid,835.aspx</comments>
      <category>Delphi</category>
    </item>
    <item>
      <trackback:ping>http://www.distribucon.com/blog/Trackback.aspx?guid=799</trackback:ping>
      <pingback:server>http://www.distribucon.com/blog/pingback.aspx</pingback:server>
      <pingback:target>http://www.distribucon.com/blog/PermaLink,guid,799.aspx</pingback:target>
      <dc:creator />
      <wfw:comment>http://www.distribucon.com/blog/CommentView,guid,799.aspx</wfw:comment>
      <wfw:commentRss>http://www.distribucon.com/blog/SyndicationService.asmx/GetEntryCommentsRss?guid=799</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">Borland is doing another <a href="http://bdn.borland.com/article/0,1410,33368,00.html" target="_new">24
hours of Delphi</a> on October 24. I'm on from 9:50am-10:20am CDT that morning (for
non-US readers, check the BDN article for time conversions)I'll be talking about migration
considerations for Delphi 2006, including changes to VCL, DBX, and DataSnap. I'm excited
about getting a chance to share some of the things that I've learned about Delphi
2006 and pass on my very favorable experience with that product. Hopefully you can
come away from my talk with a few time saving tips when migrating your applications
to Delphi 2006. Looking forward to seeing you online that day!<img width="0" height="0" src="http://www.distribucon.com/blog/aggbug.ashx?id=799" /></body>
      <title>Another 24 Hours of Delphi</title>
      <guid isPermaLink="false">http://www.distribucon.com/blog/PermaLink,guid,799.aspx</guid>
      <link>http://www.distribucon.com/blog/Another24HoursOfDelphi.aspx</link>
      <pubDate>Fri, 21 Oct 2005 16:16:00 GMT</pubDate>
      <description>Borland is doing another &lt;a href="http://bdn.borland.com/article/0,1410,33368,00.html" target="_new"&gt;24
hours of Delphi&lt;/a&gt; on October 24. I'm on from 9:50am-10:20am CDT that morning (for
non-US readers, check the BDN article for time conversions)I'll be talking about migration
considerations for Delphi 2006, including changes to VCL, DBX, and DataSnap. I'm excited
about getting a chance to share some of the things that I've learned about Delphi
2006 and pass on my very favorable experience with that product. Hopefully you can
come away from my talk with a few time saving tips when migrating your applications
to Delphi 2006. Looking forward to seeing you online that day!&lt;img width="0" height="0" src="http://www.distribucon.com/blog/aggbug.ashx?id=799" /&gt;</description>
      <comments>http://www.distribucon.com/blog/CommentView,guid,799.aspx</comments>
      <category>Delphi</category>
    </item>
    <item>
      <trackback:ping>http://www.distribucon.com/blog/Trackback.aspx?guid=771</trackback:ping>
      <pingback:server>http://www.distribucon.com/blog/pingback.aspx</pingback:server>
      <pingback:target>http://www.distribucon.com/blog/PermaLink,guid,771.aspx</pingback:target>
      <dc:creator />
      <wfw:comment>http://www.distribucon.com/blog/CommentView,guid,771.aspx</wfw:comment>
      <wfw:commentRss>http://www.distribucon.com/blog/SyndicationService.asmx/GetEntryCommentsRss?guid=771</wfw:commentRss>
      <slash:comments>4</slash:comments>
      <body xmlns="http://www.w3.org/1999/xhtml">I was preparing a writeup on how LINQ handles
IDENTITY fields, and there is some mixed news on this front. First off, the good news.
The concept of how LINQ will deal with IDENTITY fields is quite solid. The goal is
to have the DB return the new value for the IDENTITY field and then populate the object
with that new value. Very slick. Back in Delphi 5, MIDAS introduced a property TDatasetProvider.ProviderOptions.poAutoRefresh
that was supposed to do this same thing. However, it was never implemented, so it
never worked. As a result, you had to use other options, like the one I outlined in
my <a href="http://bdn.borland.com/article/0,1410,20847,00.html" target="_new">BDN
article</a>. So LINQ has a definite advantage here. 
<p>
The other really cool things about LINQ IDENTITY handling is that you can build up
a graph of objects (i.e. Orders and OrderDetails), add the object to a Customer object,
and when you do a SubmitChanges(), the IDENTITY fields are updated properly throughout
the whole object graph, in addition to linking properly in the DB. 
</p><p>
However, the bad news is that the DLINQ implementation is throwing a System.InvalidOperationException
because "There is already an open DataReader associated with this Command which must
be closed first.". If you are debugging the application and pause long enough before
continuing, the data will still get written to the DB. However, I have not been able
to get the application to work at all when just running it (i.e. Start Without Debugging).
I believe it may be due to my mixed use of retrieving a customer from the DB using
LINQ, and then creating Order and OrderDetail objects locally and adding them to the
Customer object. I say this because doing a simple add of a Category object all by
itself doesn't yield this exception. I also had an instance one time where only the
Order was inserted, and not the OrderDetail, thereby invalidating the atomicity of
the transaction. I plan on cleaning up the test case and submitting it to MS. Anyone
know where this kind of feedback should go? <img width="0" height="0" src="http://www.distribucon.com/blog/aggbug.ashx?id=771" /></p></body>
      <title>LINQ and IDENTITY fields</title>
      <guid isPermaLink="false">http://www.distribucon.com/blog/PermaLink,guid,771.aspx</guid>
      <link>http://www.distribucon.com/blog/LINQAndIDENTITYFields.aspx</link>
      <pubDate>Fri, 23 Sep 2005 16:58:00 GMT</pubDate>
      <description>I was preparing a writeup on how LINQ handles IDENTITY fields, and there is some mixed news on this front. First off, the good news. The concept of how LINQ will deal with IDENTITY fields is quite solid. The goal is to have the DB return the new value for the IDENTITY field and then populate the object with that new value. Very slick. Back in Delphi 5, MIDAS introduced a property TDatasetProvider.ProviderOptions.poAutoRefresh that was supposed to do this same thing. However, it was never implemented, so it never worked. As a result, you had to use other options, like the one I outlined in my &lt;a href="http://bdn.borland.com/article/0,1410,20847,00.html" target="_new"&gt;BDN
article&lt;/a&gt;. So LINQ has a definite advantage here. 
&lt;p&gt;
The other really cool things about LINQ IDENTITY handling is that you can build up
a graph of objects (i.e. Orders and OrderDetails), add the object to a Customer object,
and when you do a SubmitChanges(), the IDENTITY fields are updated properly throughout
the whole object graph, in addition to linking properly in the DB. 
&lt;p&gt;
However, the bad news is that the DLINQ implementation is throwing a System.InvalidOperationException
because "There is already an open DataReader associated with this Command which must
be closed first.". If you are debugging the application and pause long enough before
continuing, the data will still get written to the DB. However, I have not been able
to get the application to work at all when just running it (i.e. Start Without Debugging).
I believe it may be due to my mixed use of retrieving a customer from the DB using
LINQ, and then creating Order and OrderDetail objects locally and adding them to the
Customer object. I say this because doing a simple add of a Category object all by
itself doesn't yield this exception. I also had an instance one time where only the
Order was inserted, and not the OrderDetail, thereby invalidating the atomicity of
the transaction. I plan on cleaning up the test case and submitting it to MS. Anyone
know where this kind of feedback should go? &lt;img width="0" height="0" src="http://www.distribucon.com/blog/aggbug.ashx?id=771" /&gt;</description>
      <comments>http://www.distribucon.com/blog/CommentView,guid,771.aspx</comments>
      <category>Delphi</category>
    </item>
    <item>
      <trackback:ping>http://www.distribucon.com/blog/Trackback.aspx?guid=751</trackback:ping>
      <pingback:server>http://www.distribucon.com/blog/pingback.aspx</pingback:server>
      <pingback:target>http://www.distribucon.com/blog/PermaLink,guid,751.aspx</pingback:target>
      <dc:creator />
      <wfw:comment>http://www.distribucon.com/blog/CommentView,guid,751.aspx</wfw:comment>
      <wfw:commentRss>http://www.distribucon.com/blog/SyndicationService.asmx/GetEntryCommentsRss?guid=751</wfw:commentRss>
      <slash:comments>3</slash:comments>
      <body xmlns="http://www.w3.org/1999/xhtml">Make the time to go and watch the video
of <a href="http://bdn.borland.com/article/0,1410,33299,00.html" target="_new">JBuilder
2006 Virtual Peer Programming</a>. In one word: Brilliant! In many words: Absolutely
drop-dead awesome, incredible, fantastic, and many other synonyms for great. :-) 
<p>
In a nutshell, JB2006 will allow you to carry on IM conversations; share projects
among multiple team members; cooperatively and synchronously view, navigate, edit
and debug shared projects. The concept is great, and the implementation is even better.
I can't wait to get my hands on this in a future version of Delphi! Imagine, no more
requests like "This isn't working, can you stop over?". The possibilities are almost
endless. To name a couple of the top of my head, interactive training/mentoring without
taking a flight to the client's site and using this to implement XP anywhere. 
</p><p>
For some background, I remember chatting with <a href="http://blogs.borland.com/pjkerpan/" target="_new">Pat
Kerpan</a> back when I was in the DSP group at Borland. The conversation revolved
around this very idea, and how it could help with product development. As a matter
of fact, I actually wrote Delphi and JBuilder plugins to integrate TeamSource DSP
into the IDEs. Among the many features those plugins had, one of them was an integrated
IM client (implemented via Jabber). It was actually quite handy to have in your IDE.
At first, I wasn't sure how useful it would be, but I soon became very dependent on
it. Others seemed to like it to, since it won the <a href="http://www.fawcette.com/reports/javaone/032802/readers_choice/page14.asp" target="_new">Best
Team Development Tool award at the 2002 JavaOne conference</a>. Since it beat out
Oracle, IBM, and Rational, I was quite proud of my contribution. 
</p><p>
Still, it's a strange feeling to view this video. It's not like I'm seeing <i>my</i> baby
being born, but more like watching from afar as my best friend has a baby that I've
always wanted. Yeah, I know. Quit with the metaphors while I'm behind. ;-)<img width="0" height="0" src="http://www.distribucon.com/blog/aggbug.ashx?id=751" /></p></body>
      <title>Virtual Peer Programming</title>
      <guid isPermaLink="false">http://www.distribucon.com/blog/PermaLink,guid,751.aspx</guid>
      <link>http://www.distribucon.com/blog/VirtualPeerProgramming.aspx</link>
      <pubDate>Sat, 10 Sep 2005 19:44:00 GMT</pubDate>
      <description>Make the time to go and watch the video of &lt;a href="http://bdn.borland.com/article/0,1410,33299,00.html" target="_new"&gt;JBuilder
2006 Virtual Peer Programming&lt;/a&gt;. In one word: Brilliant! In many words: Absolutely
drop-dead awesome, incredible, fantastic, and many other synonyms for great. :-) 
&lt;p&gt;
In a nutshell, JB2006 will allow you to carry on IM conversations; share projects
among multiple team members; cooperatively and synchronously view, navigate, edit
and debug shared projects. The concept is great, and the implementation is even better.
I can't wait to get my hands on this in a future version of Delphi! Imagine, no more
requests like "This isn't working, can you stop over?". The possibilities are almost
endless. To name a couple of the top of my head, interactive training/mentoring without
taking a flight to the client's site and using this to implement XP anywhere. 
&lt;p&gt;
For some background, I remember chatting with &lt;a href="http://blogs.borland.com/pjkerpan/" target="_new"&gt;Pat
Kerpan&lt;/a&gt; back when I was in the DSP group at Borland. The conversation revolved
around this very idea, and how it could help with product development. As a matter
of fact, I actually wrote Delphi and JBuilder plugins to integrate TeamSource DSP
into the IDEs. Among the many features those plugins had, one of them was an integrated
IM client (implemented via Jabber). It was actually quite handy to have in your IDE.
At first, I wasn't sure how useful it would be, but I soon became very dependent on
it. Others seemed to like it to, since it won the &lt;a href="http://www.fawcette.com/reports/javaone/032802/readers_choice/page14.asp" target="_new"&gt;Best
Team Development Tool award at the 2002 JavaOne conference&lt;/a&gt;. Since it beat out
Oracle, IBM, and Rational, I was quite proud of my contribution. 
&lt;p&gt;
Still, it's a strange feeling to view this video. It's not like I'm seeing &lt;i&gt;my&lt;/i&gt; baby
being born, but more like watching from afar as my best friend has a baby that I've
always wanted. Yeah, I know. Quit with the metaphors while I'm behind. ;-)&lt;img width="0" height="0" src="http://www.distribucon.com/blog/aggbug.ashx?id=751" /&gt;</description>
      <comments>http://www.distribucon.com/blog/CommentView,guid,751.aspx</comments>
      <category>Delphi</category>
    </item>
    <item>
      <trackback:ping>http://www.distribucon.com/blog/Trackback.aspx?guid=740</trackback:ping>
      <pingback:server>http://www.distribucon.com/blog/pingback.aspx</pingback:server>
      <pingback:target>http://www.distribucon.com/blog/PermaLink,guid,740.aspx</pingback:target>
      <dc:creator />
      <wfw:comment>http://www.distribucon.com/blog/CommentView,guid,740.aspx</wfw:comment>
      <wfw:commentRss>http://www.distribucon.com/blog/SyndicationService.asmx/GetEntryCommentsRss?guid=740</wfw:commentRss>
      <slash:comments>2</slash:comments>
      <body xmlns="http://www.w3.org/1999/xhtml">With the loss of Project | Web Deployment
Options in Delphi 2005, you will need to create your HTML files by hand to display
ActiveForms. When doing this, remember that you will need to specify the GUID of the
CoClass, and not the GUID of the Library.<img width="0" height="0" src="http://www.distribucon.com/blog/aggbug.ashx?id=740" /></body>
      <title>ActiveForm html code</title>
      <guid isPermaLink="false">http://www.distribucon.com/blog/PermaLink,guid,740.aspx</guid>
      <link>http://www.distribucon.com/blog/ActiveFormHtmlCode.aspx</link>
      <pubDate>Fri, 02 Sep 2005 16:24:00 GMT</pubDate>
      <description>With the loss of Project | Web Deployment Options in Delphi 2005, you will need to create your HTML files by hand to display ActiveForms. When doing this, remember that you will need to specify the GUID of the CoClass, and not the GUID of the Library.&lt;img width="0" height="0" src="http://www.distribucon.com/blog/aggbug.ashx?id=740" /&gt;</description>
      <comments>http://www.distribucon.com/blog/CommentView,guid,740.aspx</comments>
      <category>Delphi</category>
    </item>
    <item>
      <trackback:ping>http://www.distribucon.com/blog/Trackback.aspx?guid=660</trackback:ping>
      <pingback:server>http://www.distribucon.com/blog/pingback.aspx</pingback:server>
      <pingback:target>http://www.distribucon.com/blog/PermaLink,guid,660.aspx</pingback:target>
      <dc:creator />
      <wfw:comment>http://www.distribucon.com/blog/CommentView,guid,660.aspx</wfw:comment>
      <wfw:commentRss>http://www.distribucon.com/blog/SyndicationService.asmx/GetEntryCommentsRss?guid=660</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">On July 13, Borland will host the <a href="http://blogs.borland.com/davidi/archive/2005/06/28/20009.aspx" target="_new">24
Hours of Delphi</a>. While it might not be as good as the TV show "24", it does look
like it will be a lot of fun. 
<p>
I'll be online chatting with them in hour 7, (7am PDT, 9am CDT, check your favorite
time conversion site for your local time). I'll be talking about a conversion of a
huge Win32 application that we did from Delphi 6 to Delphi 2005. I'm sure there will
be a mention or 2 of PopupMode in there. I've also been known to to talk about MIDAS/DataSnap,
so I'm sure that will be in the mix somewhere, too! I look forward to seeing you guys
online. Get your questions in early.<img width="0" height="0" src="http://www.distribucon.com/blog/aggbug.ashx?id=660" /></p></body>
      <title>24 Hours of Delphi</title>
      <guid isPermaLink="false">http://www.distribucon.com/blog/PermaLink,guid,660.aspx</guid>
      <link>http://www.distribucon.com/blog/24HoursOfDelphi.aspx</link>
      <pubDate>Thu, 07 Jul 2005 19:07:00 GMT</pubDate>
      <description>On July 13, Borland will host the &lt;a href="http://blogs.borland.com/davidi/archive/2005/06/28/20009.aspx" target="_new"&gt;24
Hours of Delphi&lt;/a&gt;. While it might not be as good as the TV show "24", it does look
like it will be a lot of fun. 
&lt;p&gt;
I'll be online chatting with them in hour 7, (7am PDT, 9am CDT, check your favorite
time conversion site for your local time). I'll be talking about a conversion of a
huge Win32 application that we did from Delphi 6 to Delphi 2005. I'm sure there will
be a mention or 2 of PopupMode in there. I've also been known to to talk about MIDAS/DataSnap,
so I'm sure that will be in the mix somewhere, too! I look forward to seeing you guys
online. Get your questions in early.&lt;img width="0" height="0" src="http://www.distribucon.com/blog/aggbug.ashx?id=660" /&gt;</description>
      <comments>http://www.distribucon.com/blog/CommentView,guid,660.aspx</comments>
      <category>Delphi</category>
    </item>
    <item>
      <trackback:ping>http://www.distribucon.com/blog/Trackback.aspx?guid=591</trackback:ping>
      <pingback:server>http://www.distribucon.com/blog/pingback.aspx</pingback:server>
      <pingback:target>http://www.distribucon.com/blog/PermaLink,guid,591.aspx</pingback:target>
      <dc:creator />
      <wfw:comment>http://www.distribucon.com/blog/CommentView,guid,591.aspx</wfw:comment>
      <wfw:commentRss>http://www.distribucon.com/blog/SyndicationService.asmx/GetEntryCommentsRss?guid=591</wfw:commentRss>
      <slash:comments>2</slash:comments>
      <body xmlns="http://www.w3.org/1999/xhtml">I use Component Templates a lot. I find
it to be the easiest way to start writing a test case when trying to isolate a bug.
For example, one template that I have used since the invention of templates is to
have a DataSource, ClientDataset, DatasetProvider, SQLQuery, SQLConnection, and DBGrid
all hooked up and ready to go. When I see something I need to check out, I just drop
the TDBXTemplate onto my form and I'm off and running. Unfortunately, a bug in Delphi
2005 <a href="http://qc.borland.com/wc/qcmain.aspx?d=9654" taraget="_new">prevents
multiple components from being selected simultaneously</a>, which means you can't
create Component Templates like this. 
<p>
What I've done for now is to go to the design view of the form, select the text of
all the components, and add it to the Code Snippets window (select text, press Alt,
and drag the text block to the Tool Palette). This means that when I want to create
this "template", I have to go to the text view of the form and use the Code Snippet.
I'm not thrilled about having to do this, but at least it's a workaround for now.<img width="0" height="0" src="http://www.distribucon.com/blog/aggbug.ashx?id=591" /></p></body>
      <title>Delphi 2005 Component Templates</title>
      <guid isPermaLink="false">http://www.distribucon.com/blog/PermaLink,guid,591.aspx</guid>
      <link>http://www.distribucon.com/blog/Delphi2005ComponentTemplates.aspx</link>
      <pubDate>Thu, 16 Jun 2005 20:53:00 GMT</pubDate>
      <description>I use Component Templates a lot. I find it to be the easiest way to start writing a test case when trying to isolate a bug. For example, one template that I have used since the invention of templates is to have a DataSource, ClientDataset, DatasetProvider, SQLQuery, SQLConnection, and DBGrid all hooked up and ready to go. When I see something I need to check out, I just drop the TDBXTemplate onto my form and I'm off and running. Unfortunately, a bug in Delphi 2005 &lt;a href="http://qc.borland.com/wc/qcmain.aspx?d=9654" taraget="_new"&gt;prevents
multiple components from being selected simultaneously&lt;/a&gt;, which means you can't
create Component Templates like this. 
&lt;p&gt;
What I've done for now is to go to the design view of the form, select the text of
all the components, and add it to the Code Snippets window (select text, press Alt,
and drag the text block to the Tool Palette). This means that when I want to create
this "template", I have to go to the text view of the form and use the Code Snippet.
I'm not thrilled about having to do this, but at least it's a workaround for now.&lt;img width="0" height="0" src="http://www.distribucon.com/blog/aggbug.ashx?id=591" /&gt;</description>
      <comments>http://www.distribucon.com/blog/CommentView,guid,591.aspx</comments>
      <category>Delphi</category>
    </item>
    <item>
      <trackback:ping>http://www.distribucon.com/blog/Trackback.aspx?guid=558</trackback:ping>
      <pingback:server>http://www.distribucon.com/blog/pingback.aspx</pingback:server>
      <pingback:target>http://www.distribucon.com/blog/PermaLink,guid,558.aspx</pingback:target>
      <dc:creator />
      <wfw:comment>http://www.distribucon.com/blog/CommentView,guid,558.aspx</wfw:comment>
      <wfw:commentRss>http://www.distribucon.com/blog/SyndicationService.asmx/GetEntryCommentsRss?guid=558</wfw:commentRss>
      <slash:comments>4</slash:comments>
      <body xmlns="http://www.w3.org/1999/xhtml">During conversion of our application suite
to Delphi 2005, I ran into a very irritating bug where a form was flashing <b>extremely</b> quickly
during application startup. It was so fast that I couldn't get a feel for which screen
it was that was flashing. Debugging the application also didn't reveal what form it
was. So, what to do? I thought of using <a href="http://www.techsmith.com/products/studio/default.asp" target="_new">Camtasia</a> to
record the screen during startup, and then play back the recorded session at a very
slow rate so that I could find out what I needed to know. I had to be sure to crank
up the frames per second capture rate as high as it would go, but after a smooth install
and some tweaking of options in Camtasia, the plan worked beautifully. I found out
what form it was that was flashing, and then fixed it. 
<p>
The gory details were that this form only got included from a DLL that had its conditional
compilation directives wrong (for this build). However, this flash didn't occur in
the Delphi 6 days. So I thought back to my previous experiences with PopupMode, and
set PopupMode to pmAuto for this form and everything is great again. 
</p><p>
Some days, I long for the Ctrl-S / Ctrl-Q days again. :-)<img width="0" height="0" src="http://www.distribucon.com/blog/aggbug.ashx?id=558" /></p></body>
      <title>Camtasia for Debugging</title>
      <guid isPermaLink="false">http://www.distribucon.com/blog/PermaLink,guid,558.aspx</guid>
      <link>http://www.distribucon.com/blog/CamtasiaForDebugging.aspx</link>
      <pubDate>Fri, 03 Jun 2005 16:21:00 GMT</pubDate>
      <description>During conversion of our application suite to Delphi 2005, I ran into a very irritating bug where a form was flashing &lt;b&gt;extremely&lt;/b&gt; quickly
during application startup. It was so fast that I couldn't get a feel for which screen
it was that was flashing. Debugging the application also didn't reveal what form it
was. So, what to do? I thought of using &lt;a href="http://www.techsmith.com/products/studio/default.asp" target="_new"&gt;Camtasia&lt;/a&gt; to
record the screen during startup, and then play back the recorded session at a very
slow rate so that I could find out what I needed to know. I had to be sure to crank
up the frames per second capture rate as high as it would go, but after a smooth install
and some tweaking of options in Camtasia, the plan worked beautifully. I found out
what form it was that was flashing, and then fixed it. 
&lt;p&gt;
The gory details were that this form only got included from a DLL that had its conditional
compilation directives wrong (for this build). However, this flash didn't occur in
the Delphi 6 days. So I thought back to my previous experiences with PopupMode, and
set PopupMode to pmAuto for this form and everything is great again. 
&lt;p&gt;
Some days, I long for the Ctrl-S / Ctrl-Q days again. :-)&lt;img width="0" height="0" src="http://www.distribucon.com/blog/aggbug.ashx?id=558" /&gt;</description>
      <comments>http://www.distribucon.com/blog/CommentView,guid,558.aspx</comments>
      <category>Delphi</category>
    </item>
    <item>
      <trackback:ping>http://www.distribucon.com/blog/Trackback.aspx?guid=557</trackback:ping>
      <pingback:server>http://www.distribucon.com/blog/pingback.aspx</pingback:server>
      <pingback:target>http://www.distribucon.com/blog/PermaLink,guid,557.aspx</pingback:target>
      <dc:creator />
      <wfw:comment>http://www.distribucon.com/blog/CommentView,guid,557.aspx</wfw:comment>
      <wfw:commentRss>http://www.distribucon.com/blog/SyndicationService.asmx/GetEntryCommentsRss?guid=557</wfw:commentRss>
      <slash:comments>1</slash:comments>
      <body xmlns="http://www.w3.org/1999/xhtml">I had a need to get AutoUpdate functionality
into one of my applications, so that meant a perusal of Google to find out what others
were using. After checking out several options, I deceided that <a href="http://www.devarchive.com/f2184.html" target="_new">AutoUpgrader</a> fit
the bill nicely. There were plenty of options and events to help control the AutoUpdate
process. There was also a trial version that supported Delphi 2005, so that made it
easier to try it out to see how it works. It requires a text file on a server somewhere,
defining the newest version available. If a new version exists on the server, the
component downloads the new version (all the while, providing status information about
the download), and restarts the application to use the newer one. 
<p>
The only downside was that the component has a VersionNumber property that is used
to compare versions. I would prefer that the component would be smart enough to retrieve
the version information from the file and use that, but this is easily remedied by
placing this line of code in the DataModule.OnCreate where the AutoUpgrader resides: 
</p><pre><code> // GetVersionInfo is a locally defined function to retrieve version
info from the current Application AutoUpgrader1.VersionNumber := GetVersionInfo; </code></pre><img width="0" height="0" src="http://www.distribucon.com/blog/aggbug.ashx?id=557" /></body>
      <title>AutoUpdate component for Delphi</title>
      <guid isPermaLink="false">http://www.distribucon.com/blog/PermaLink,guid,557.aspx</guid>
      <link>http://www.distribucon.com/blog/AutoUpdateComponentForDelphi.aspx</link>
      <pubDate>Thu, 02 Jun 2005 14:12:00 GMT</pubDate>
      <description>I had a need to get AutoUpdate functionality into one of my applications, so that meant a perusal of Google to find out what others were using. After checking out several options, I deceided that &lt;a href="http://www.devarchive.com/f2184.html" target="_new"&gt;AutoUpgrader&lt;/a&gt; fit
the bill nicely. There were plenty of options and events to help control the AutoUpdate
process. There was also a trial version that supported Delphi 2005, so that made it
easier to try it out to see how it works. It requires a text file on a server somewhere,
defining the newest version available. If a new version exists on the server, the
component downloads the new version (all the while, providing status information about
the download), and restarts the application to use the newer one. 
&lt;p&gt;
The only downside was that the component has a VersionNumber property that is used
to compare versions. I would prefer that the component would be smart enough to retrieve
the version information from the file and use that, but this is easily remedied by
placing this line of code in the DataModule.OnCreate where the AutoUpgrader resides: &lt;pre&gt;&lt;code&gt; //
GetVersionInfo is a locally defined function to retrieve version info from the current
Application AutoUpgrader1.VersionNumber := GetVersionInfo; &lt;/code&gt;&lt;/pre&gt;&lt;img width="0" height="0" src="http://www.distribucon.com/blog/aggbug.ashx?id=557" /&gt;</description>
      <comments>http://www.distribucon.com/blog/CommentView,guid,557.aspx</comments>
      <category>Delphi</category>
    </item>
    <item>
      <trackback:ping>http://www.distribucon.com/blog/Trackback.aspx?guid=551</trackback:ping>
      <pingback:server>http://www.distribucon.com/blog/pingback.aspx</pingback:server>
      <pingback:target>http://www.distribucon.com/blog/PermaLink,guid,551.aspx</pingback:target>
      <dc:creator />
      <wfw:comment>http://www.distribucon.com/blog/CommentView,guid,551.aspx</wfw:comment>
      <wfw:commentRss>http://www.distribucon.com/blog/SyndicationService.asmx/GetEntryCommentsRss?guid=551</wfw:commentRss>
      <slash:comments>1</slash:comments>
      <body xmlns="http://www.w3.org/1999/xhtml">I'm using Indy 9 here with Delphi 2005,
and recently installed the Delphi 2005 Update 3 patch. During the patch process, several
files that I deleted came back, along with several registry entries. Afterwards, I
was getting an error when trying to load a DataModule that had some Indy components
on them telling me that Indy90 could not be loaded because it uses IdWinsock2, which
was already loaded by dclIndyCore. I imagine this happened during the install of the
update by copying registry entries from HKLM to HKCU. 
<p>
To work around this, delete the following registry entries: 
</p><pre><code> HKCU\Software\Borland\BDS\3.0\Known Assemblies\c:\program files\borland\bds\3.0\bin\dclIndyCore.bpl
HKCU\Software\Borland\BDS\3.0\Known Assemblies\c:\program files\borland\bds\3.0\bin\dclIndyProtocols.bpl </code></pre><img width="0" height="0" src="http://www.distribucon.com/blog/aggbug.ashx?id=551" /></body>
      <title>Delphi 2005 Update 3 and Indy 9</title>
      <guid isPermaLink="false">http://www.distribucon.com/blog/PermaLink,guid,551.aspx</guid>
      <link>http://www.distribucon.com/blog/Delphi2005Update3AndIndy9.aspx</link>
      <pubDate>Tue, 24 May 2005 20:18:00 GMT</pubDate>
      <description>I'm using Indy 9 here with Delphi 2005, and recently installed the Delphi 2005 Update 3 patch. During the patch process, several files that I deleted came back, along with several registry entries. Afterwards, I was getting an error when trying to load a DataModule that had some Indy components on them telling me that Indy90 could not be loaded because it uses IdWinsock2, which was already loaded by dclIndyCore. I imagine this happened during the install of the update by copying registry entries from HKLM to HKCU.
&lt;p&gt;
To work around this, delete the following registry entries: &lt;pre&gt;&lt;code&gt; HKCU\Software\Borland\BDS\3.0\Known
Assemblies\c:\program files\borland\bds\3.0\bin\dclIndyCore.bpl HKCU\Software\Borland\BDS\3.0\Known
Assemblies\c:\program files\borland\bds\3.0\bin\dclIndyProtocols.bpl &lt;/code&gt;&lt;/pre&gt;
&lt;img width="0" height="0" src="http://www.distribucon.com/blog/aggbug.ashx?id=551" /&gt;</description>
      <comments>http://www.distribucon.com/blog/CommentView,guid,551.aspx</comments>
      <category>Delphi</category>
    </item>
    <item>
      <trackback:ping>http://www.distribucon.com/blog/Trackback.aspx?guid=536</trackback:ping>
      <pingback:server>http://www.distribucon.com/blog/pingback.aspx</pingback:server>
      <pingback:target>http://www.distribucon.com/blog/PermaLink,guid,536.aspx</pingback:target>
      <dc:creator />
      <wfw:comment>http://www.distribucon.com/blog/CommentView,guid,536.aspx</wfw:comment>
      <wfw:commentRss>http://www.distribucon.com/blog/SyndicationService.asmx/GetEntryCommentsRss?guid=536</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">If you use the ChildRDM architecture available
in Delphi 6 in %DELPHI%\Demos\Midas\SharedConn, there is a possibility of the server
hanging in memory after all clients have exited. This really only applies if you are
using a COM object in another DLL and using that COM object as a ChildRDM in your
main server EXE. 
<p>
Debugging the problem, I found that there were still references to the external DLL,
and that the CPU view was showing me that the EXE was repeatedly trying to enter a
critical section, but not being able to do so. If you look at the destruction code
for TDataModule, you'll see that it tries to lock access to the DataModule. Well,
if you rely on Delphi to get rid of internally stored interface references when they
go out of scope, it will be too late to reclaim the external DLL. The solution is
as follows: 
</p><p>
Create an overridden BeforeDestruction method in the main RDM. In that RDM, set all
of your ChildRDM interface references to nil in order to explicitly release the COM
objects. Then, make a call to CoFreeUnusedLibraries (found in ActiveX.pas). This will
release the DLL, if the COM subsystem says it's OK to do so. However, I found that
even that was enough in all cases, so add another call to CoFreeUnusedLibraries in
the main RDM's finalization section. See the code snippet here: 
</p><p></p><pre><code><b>procedure</b> TMainRDM.BeforeDestruction; <b>begin</b> fSharedDataRdm
:= <b>nil</b>; fChildRdm := <b>nil</b>; CoFreeUnusedLibraries; <b>inherited</b>; <b>end</b>; <b>initialization</b> TComponentFactory.Create(ComServer,
TMainRDM, Class_MainRDM, ciMultiInstance, tmApartment); <b>finalization</b> CoFreeUnusedLibraries; <b>end</b>. </code></pre><p>
After doing this, I was not able to get the app server to hang in memory again.<img width="0" height="0" src="http://www.distribucon.com/blog/aggbug.ashx?id=536" /></p></body>
      <title>Hanging Thread/Server problem</title>
      <guid isPermaLink="false">http://www.distribucon.com/blog/PermaLink,guid,536.aspx</guid>
      <link>http://www.distribucon.com/blog/HangingThreadServerProblem.aspx</link>
      <pubDate>Thu, 28 Apr 2005 21:59:00 GMT</pubDate>
      <description>If you use the ChildRDM architecture available in Delphi 6 in %DELPHI%\Demos\Midas\SharedConn, there is a possibility of the server hanging in memory after all clients have exited. This really only applies if you are using a COM object in another DLL and using that COM object as a ChildRDM in your main server EXE.
&lt;p&gt;
Debugging the problem, I found that there were still references to the external DLL,
and that the CPU view was showing me that the EXE was repeatedly trying to enter a
critical section, but not being able to do so. If you look at the destruction code
for TDataModule, you'll see that it tries to lock access to the DataModule. Well,
if you rely on Delphi to get rid of internally stored interface references when they
go out of scope, it will be too late to reclaim the external DLL. The solution is
as follows: 
&lt;p&gt;
Create an overridden BeforeDestruction method in the main RDM. In that RDM, set all
of your ChildRDM interface references to nil in order to explicitly release the COM
objects. Then, make a call to CoFreeUnusedLibraries (found in ActiveX.pas). This will
release the DLL, if the COM subsystem says it's OK to do so. However, I found that
even that was enough in all cases, so add another call to CoFreeUnusedLibraries in
the main RDM's finalization section. See the code snippet here: 
&lt;p&gt;
&lt;pre&gt;&lt;code&gt; &lt;b&gt;procedure&lt;/b&gt; TMainRDM.BeforeDestruction; &lt;b&gt;begin&lt;/b&gt; fSharedDataRdm
:= &lt;b&gt;nil&lt;/b&gt;; fChildRdm := &lt;b&gt;nil&lt;/b&gt;; CoFreeUnusedLibraries; &lt;b&gt;inherited&lt;/b&gt;; &lt;b&gt;end&lt;/b&gt;; &lt;b&gt;initialization&lt;/b&gt; TComponentFactory.Create(ComServer,
TMainRDM, Class_MainRDM, ciMultiInstance, tmApartment); &lt;b&gt;finalization&lt;/b&gt; CoFreeUnusedLibraries; &lt;b&gt;end&lt;/b&gt;. &lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;
After doing this, I was not able to get the app server to hang in memory again.&lt;img width="0" height="0" src="http://www.distribucon.com/blog/aggbug.ashx?id=536" /&gt;</description>
      <comments>http://www.distribucon.com/blog/CommentView,guid,536.aspx</comments>
      <category>Delphi</category>
    </item>
    <item>
      <trackback:ping>http://www.distribucon.com/blog/Trackback.aspx?guid=530</trackback:ping>
      <pingback:server>http://www.distribucon.com/blog/pingback.aspx</pingback:server>
      <pingback:target>http://www.distribucon.com/blog/PermaLink,guid,530.aspx</pingback:target>
      <dc:creator />
      <wfw:comment>http://www.distribucon.com/blog/CommentView,guid,530.aspx</wfw:comment>
      <wfw:commentRss>http://www.distribucon.com/blog/SyndicationService.asmx/GetEntryCommentsRss?guid=530</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">Quality Insight is Borland's re-branding
of the <a href="http://sourceforge.net/projects/jcl" target="_new">JCL</a> OTAPI exception,
combined with an interface to submit bug reports directly to <a href="http://qc.borland.com/wc/qcmain.aspx" target="_new">QC</a>.
In a nutshell, it takes any unhandled exceptions that occur in the Delphi 2005 IDE,
report a dialog - complete with stack trace - to you, and allows you to submit the
bug report to QC. It's similar in concept to Windows' online error reporting mechanism.
It's a very handy tool, and I believe it will help increase the stability of the IDE,
since it gives R&amp;D more information about bugs that pop up in the IDE. 
<p>
Unfortunately, it looks like it is disabled by default during install (at least it
was here on all 8 machines). To turn this useful feature on, run regedit.exe and set
the following key/value pair in 
</p><pre><code>HKCU\Software\Borland\BDS\3.0\Known IDE Packages</code></pre><br /><pre><code>$(BDS)\Bin\exceptiondiag90.bpl = (Untitled)</code></pre><p>
If the value is blank, the package will not be loaded in the IDE. Therefore, set it
to some arbitrary value, like "(Untitled)", restart Delphi, and you should be greeted
with the exception dialog the next time you encounter an unhandled exception in the
IDE. 
</p><p><i>Note: Be careful of using other 3rd party exception tools (e.g. madExcept and Eureka).
You'll have to test for sure, but these other packages may end up consuming the exception
before it gets to Quality Insight. If that's the case, simply disable the IDE package
of the 3rd party exception tool.</i><img width="0" height="0" src="http://www.distribucon.com/blog/aggbug.ashx?id=530" /></p></body>
      <title>Enabling Quality Insight in D2005</title>
      <guid isPermaLink="false">http://www.distribucon.com/blog/PermaLink,guid,530.aspx</guid>
      <link>http://www.distribucon.com/blog/EnablingQualityInsightInD2005.aspx</link>
      <pubDate>Thu, 21 Apr 2005 14:27:00 GMT</pubDate>
      <description>Quality Insight is Borland's re-branding of the &lt;a href="http://sourceforge.net/projects/jcl" target="_new"&gt;JCL&lt;/a&gt; OTAPI
exception, combined with an interface to submit bug reports directly to &lt;a href="http://qc.borland.com/wc/qcmain.aspx" target="_new"&gt;QC&lt;/a&gt;.
In a nutshell, it takes any unhandled exceptions that occur in the Delphi 2005 IDE,
report a dialog - complete with stack trace - to you, and allows you to submit the
bug report to QC. It's similar in concept to Windows' online error reporting mechanism.
It's a very handy tool, and I believe it will help increase the stability of the IDE,
since it gives R&amp;amp;D more information about bugs that pop up in the IDE. 
&lt;p&gt;
Unfortunately, it looks like it is disabled by default during install (at least it
was here on all 8 machines). To turn this useful feature on, run regedit.exe and set
the following key/value pair in &lt;pre&gt;&lt;code&gt;HKCU\Software\Borland\BDS\3.0\Known IDE
Packages&lt;/code&gt;&lt;/pre&gt;
&lt;br&gt;
&lt;pre&gt;&lt;code&gt;$(BDS)\Bin\exceptiondiag90.bpl = (Untitled)&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;
If the value is blank, the package will not be loaded in the IDE. Therefore, set it
to some arbitrary value, like "(Untitled)", restart Delphi, and you should be greeted
with the exception dialog the next time you encounter an unhandled exception in the
IDE. 
&lt;p&gt;
&lt;i&gt;Note: Be careful of using other 3rd party exception tools (e.g. madExcept and Eureka).
You'll have to test for sure, but these other packages may end up consuming the exception
before it gets to Quality Insight. If that's the case, simply disable the IDE package
of the 3rd party exception tool.&lt;/i&gt;&lt;img width="0" height="0" src="http://www.distribucon.com/blog/aggbug.ashx?id=530" /&gt;</description>
      <comments>http://www.distribucon.com/blog/CommentView,guid,530.aspx</comments>
      <category>Delphi</category>
    </item>
    <item>
      <trackback:ping>http://www.distribucon.com/blog/Trackback.aspx?guid=519</trackback:ping>
      <pingback:server>http://www.distribucon.com/blog/pingback.aspx</pingback:server>
      <pingback:target>http://www.distribucon.com/blog/PermaLink,guid,519.aspx</pingback:target>
      <dc:creator />
      <wfw:comment>http://www.distribucon.com/blog/CommentView,guid,519.aspx</wfw:comment>
      <wfw:commentRss>http://www.distribucon.com/blog/SyndicationService.asmx/GetEntryCommentsRss?guid=519</wfw:commentRss>
      <slash:comments>4</slash:comments>
      <body xmlns="http://www.w3.org/1999/xhtml">In my <a href="http://distribucon.com/blog/archive/2005/04/11/516.aspx" target="_new">last
entry</a>, I discussed a simple work-around for overcoming a new Delphi 2005 bug.
After further review, the Bears still suck. Sorry, that probably only makes sense
if you knew the story of the Packers/Bears instant replay game. See <a href="http://www.packers.com/lambeau_field/history/15_memorable_games/" target="_new">the
November 5, 1989 game on this page</a> for more details - and yes, the replay official
got it right. :-) 
<p>
Back to our PageControl story... The work-around I provided works well, but the problem
is that countless other things in the VCL also fire off a request to do a RecreateWnd
(e.g. setting a form's Parent). This means that you would need to do all of the things
that cause RecreateWnd to be done before setting ActivePage. That's not entirely possible.
Here is my new list of possible work-arounds: 
</p><ul><li>
Patch the VCL to fix the new TPageControl.SetTabIndex method. Either comment out everything
after inherited, or add code to take invisible tabs into consideration (a la TPageControl.GetImageIndex).
This will only work if you don't use run-time packages, though. 
</li><li>
Create a descendant TPageControl, override the TPageControl.SetTabIndex method, and
either fix the method or restore to D6 functionality (only call inherited) 
</li><li>
Wait for the fix in the VCL code 
</li></ul><img width="0" height="0" src="http://www.distribucon.com/blog/aggbug.ashx?id=519" /></body>
      <title>Delphi 2005 TPageControl follow-up</title>
      <guid isPermaLink="false">http://www.distribucon.com/blog/PermaLink,guid,519.aspx</guid>
      <link>http://www.distribucon.com/blog/Delphi2005TPageControlFollowup.aspx</link>
      <pubDate>Wed, 13 Apr 2005 14:01:00 GMT</pubDate>
      <description>In my &lt;a href="http://distribucon.com/blog/archive/2005/04/11/516.aspx" target="_new"&gt;last
entry&lt;/a&gt;, I discussed a simple work-around for overcoming a new Delphi 2005 bug.
After further review, the Bears still suck. Sorry, that probably only makes sense
if you knew the story of the Packers/Bears instant replay game. See &lt;a href="http://www.packers.com/lambeau_field/history/15_memorable_games/" target="_new"&gt;the
November 5, 1989 game on this page&lt;/a&gt; for more details - and yes, the replay official
got it right. :-) 
&lt;p&gt;
Back to our PageControl story... The work-around I provided works well, but the problem
is that countless other things in the VCL also fire off a request to do a RecreateWnd
(e.g. setting a form's Parent). This means that you would need to do all of the things
that cause RecreateWnd to be done before setting ActivePage. That's not entirely possible.
Here is my new list of possible work-arounds: 
&lt;ul&gt;
&lt;li&gt;
Patch the VCL to fix the new TPageControl.SetTabIndex method. Either comment out everything
after inherited, or add code to take invisible tabs into consideration (a la TPageControl.GetImageIndex).
This will only work if you don't use run-time packages, though. 
&lt;li&gt;
Create a descendant TPageControl, override the TPageControl.SetTabIndex method, and
either fix the method or restore to D6 functionality (only call inherited) 
&lt;li&gt;
Wait for the fix in the VCL code 
&lt;/ul&gt;
&lt;img width="0" height="0" src="http://www.distribucon.com/blog/aggbug.ashx?id=519" /&gt;</description>
      <comments>http://www.distribucon.com/blog/CommentView,guid,519.aspx</comments>
      <category>Delphi</category>
    </item>
    <item>
      <trackback:ping>http://www.distribucon.com/blog/Trackback.aspx?guid=516</trackback:ping>
      <pingback:server>http://www.distribucon.com/blog/pingback.aspx</pingback:server>
      <pingback:target>http://www.distribucon.com/blog/PermaLink,guid,516.aspx</pingback:target>
      <dc:creator />
      <wfw:comment>http://www.distribucon.com/blog/CommentView,guid,516.aspx</wfw:comment>
      <wfw:commentRss>http://www.distribucon.com/blog/SyndicationService.asmx/GetEntryCommentsRss?guid=516</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">Unlike my last entry, I <b>would</b> classify
this one as a bug. 
<p>
If you use a TPageControl, and you set certain Tabsheets to invisible, and then you
set the OwnerDraw property to true on the PageControl (like the code listed below),
you will not get the proper page selected. This is due to a new method, TPageControl.SetTabIndex,
that doesn't take visible tabs/pages into account before trying to set the PageControl.ActivePage
property. In Delphi 6, this method didn't exist, and everything worked fine. However,
in Delphi 2005, things are different. When you set OwnerDraw, the underlying window
is recreated. During the destroy of the window, the current tab index is saved off
so that it can be restored when the window is later recreated. It is at this point
that the new SetTabIndex method is called, and in that method, notice that no effort
is made to determine that any tabs have been set invisible, therefore, the wrong page
is selected. 
</p><p>
The simple workaround is to set OwnerDraw in the DFM, or at the very least, set OwnerDraw
prior to setting any tabs to invisible. 
</p><p></p><pre><code> Tabsheet2.TabVisible := false; Pagecontrol1.ActivePage := Tabsheet4;
Pagecontrol1.OwnerDraw := true; </code></pre><p>
I also submitted this to Quality Central (QC) as <a href="http://qc.borland.com/wc/qcmain.aspx?d=11978" target="_new">issue
11978</a>. You will find a test case in that entry, too. 
</p><p>
Lastly, thanks to both Chris Hesik (Borland) for helping me out with some debugger
issues, and Rich Werning for helping debug this to the point where we could come up
with a valid test case.<img width="0" height="0" src="http://www.distribucon.com/blog/aggbug.ashx?id=516" /></p></body>
      <title>Delphi 2005 TPageControl change</title>
      <guid isPermaLink="false">http://www.distribucon.com/blog/PermaLink,guid,516.aspx</guid>
      <link>http://www.distribucon.com/blog/Delphi2005TPageControlChange.aspx</link>
      <pubDate>Mon, 11 Apr 2005 22:08:00 GMT</pubDate>
      <description>Unlike my last entry, I &lt;b&gt;would&lt;/b&gt; classify this one as a bug. 
&lt;p&gt;
If you use a TPageControl, and you set certain Tabsheets to invisible, and then you
set the OwnerDraw property to true on the PageControl (like the code listed below),
you will not get the proper page selected. This is due to a new method, TPageControl.SetTabIndex,
that doesn't take visible tabs/pages into account before trying to set the PageControl.ActivePage
property. In Delphi 6, this method didn't exist, and everything worked fine. However,
in Delphi 2005, things are different. When you set OwnerDraw, the underlying window
is recreated. During the destroy of the window, the current tab index is saved off
so that it can be restored when the window is later recreated. It is at this point
that the new SetTabIndex method is called, and in that method, notice that no effort
is made to determine that any tabs have been set invisible, therefore, the wrong page
is selected. 
&lt;p&gt;
The simple workaround is to set OwnerDraw in the DFM, or at the very least, set OwnerDraw
prior to setting any tabs to invisible. 
&lt;p&gt;
&lt;pre&gt;&lt;code&gt; Tabsheet2.TabVisible := false; Pagecontrol1.ActivePage := Tabsheet4; Pagecontrol1.OwnerDraw
:= true; &lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;
I also submitted this to Quality Central (QC) as &lt;a href="http://qc.borland.com/wc/qcmain.aspx?d=11978" target="_new"&gt;issue
11978&lt;/a&gt;. You will find a test case in that entry, too. 
&lt;p&gt;
Lastly, thanks to both Chris Hesik (Borland) for helping me out with some debugger
issues, and Rich Werning for helping debug this to the point where we could come up
with a valid test case.&lt;img width="0" height="0" src="http://www.distribucon.com/blog/aggbug.ashx?id=516" /&gt;</description>
      <comments>http://www.distribucon.com/blog/CommentView,guid,516.aspx</comments>
      <category>Delphi</category>
    </item>
    <item>
      <trackback:ping>http://www.distribucon.com/blog/Trackback.aspx?guid=511</trackback:ping>
      <pingback:server>http://www.distribucon.com/blog/pingback.aspx</pingback:server>
      <pingback:target>http://www.distribucon.com/blog/PermaLink,guid,511.aspx</pingback:target>
      <dc:creator />
      <wfw:comment>http://www.distribucon.com/blog/CommentView,guid,511.aspx</wfw:comment>
      <wfw:commentRss>http://www.distribucon.com/blog/SyndicationService.asmx/GetEntryCommentsRss?guid=511</wfw:commentRss>
      <slash:comments>1</slash:comments>
      <body xmlns="http://www.w3.org/1999/xhtml">Here's an interesting change between Delphi
6 and Delphi 2005 in the VCL. Take the following code snippet where SQLQuery1.SQLConnection
= nil:<br /><code><pre>
SQLQuery1.SQL.Text := 'select * from MyTable where ID = :ID';
SQLQuery1.Params.ParamByName('ID').DataType := ftInteger;
</pre></code><p>
In Delphi 6, everything works fine. In Delphi 2005, TSQLQuery.QueryChanged has been
updated to use TSQLQuery.SetParamsFromSQL internally. This means that if you don't
have a SQLConnection assigned when updating the query text, then the params will be
cleared. This means that an exception will be thrown when trying to do the ParamByName
call. 
</p><p>
I'm not sure that this would qualify as a bug, per se, but it definitely changes your
application's behavior when all of these circumstances are present.<img width="0" height="0" src="http://www.distribucon.com/blog/aggbug.ashx?id=511" /></p></body>
      <title>Delphi 2005 DBX change</title>
      <guid isPermaLink="false">http://www.distribucon.com/blog/PermaLink,guid,511.aspx</guid>
      <link>http://www.distribucon.com/blog/Delphi2005DBXChange.aspx</link>
      <pubDate>Tue, 05 Apr 2005 20:24:00 GMT</pubDate>
      <description>Here's an interesting change between Delphi 6 and Delphi 2005 in the VCL. Take the following code snippet where SQLQuery1.SQLConnection = nil:&lt;br&gt;
&lt;code&gt;&lt;pre&gt;
SQLQuery1.SQL.Text := 'select * from MyTable where ID = :ID';
SQLQuery1.Params.ParamByName('ID').DataType := ftInteger;
&lt;/pre&gt;&lt;/code&gt; 
&lt;p&gt;
In Delphi 6, everything works fine. In Delphi 2005, TSQLQuery.QueryChanged has been
updated to use TSQLQuery.SetParamsFromSQL internally. This means that if you don't
have a SQLConnection assigned when updating the query text, then the params will be
cleared. This means that an exception will be thrown when trying to do the ParamByName
call. 
&lt;p&gt;
I'm not sure that this would qualify as a bug, per se, but it definitely changes your
application's behavior when all of these circumstances are present.&lt;img width="0" height="0" src="http://www.distribucon.com/blog/aggbug.ashx?id=511" /&gt;</description>
      <comments>http://www.distribucon.com/blog/CommentView,guid,511.aspx</comments>
      <category>Delphi</category>
    </item>
    <item>
      <trackback:ping>http://www.distribucon.com/blog/Trackback.aspx?guid=510</trackback:ping>
      <pingback:server>http://www.distribucon.com/blog/pingback.aspx</pingback:server>
      <pingback:target>http://www.distribucon.com/blog/PermaLink,guid,510.aspx</pingback:target>
      <dc:creator />
      <wfw:comment>http://www.distribucon.com/blog/CommentView,guid,510.aspx</wfw:comment>
      <wfw:commentRss>http://www.distribucon.com/blog/SyndicationService.asmx/GetEntryCommentsRss?guid=510</wfw:commentRss>
      <slash:comments>2</slash:comments>
      <title>The evolution of Delphi</title>
      <guid isPermaLink="false">http://www.distribucon.com/blog/PermaLink,guid,510.aspx</guid>
      <link>http://www.distribucon.com/blog/TheEvolutionOfDelphi.aspx</link>
      <pubDate>Tue, 05 Apr 2005 14:35:00 GMT</pubDate>
      <description>&lt;a href="http://blogs.borland.com/mslinn/" target="_new"&gt;Michael Slinn&lt;/a&gt; is the
new Sr. Product Manager for Delphi, C++, C# and .NET at Borland (wow, that's a mouthful
for a title!). I have enjoyed reading his blog posts, his replies to comments, and
his posts in the newsgroups. He asked about the top 10 things that can be done to
market Delphi, so I came up with this one idea that I thought was worth sharing. 
&lt;p&gt;
Thesis: I believe the IDE and personalities should be broken out into separate SKUs. 
&lt;p&gt;
Since the Galileo IDE can support multiple languages, it might make more sense to
break up the SKUs better. With VS.NET, you buy VS.NET and get VB.NET, C#, and C++
- whether you want them all or not. My thought is that you could have the IDE be sold
as the base item. It would contain things like source code integration, StarTeam integration,
Caliber/RM integration, Refactoring, and maybe some more core bits. The personalities
could then be sold as add-on packages. Delphi would contain Win32 and .NET. The C#
personality would be separate from that, as would the C++ personality. Each personality
would be sold as Pro, Enterprise, or Architect. The add-on packages would plugin to
the main IDE and contain all of the bits that pertain to that personality (e.g. VCL,
VCL.NET, debugger, designers, etc.). 
&lt;p&gt;
While this would be more work initially for Borland, I think the benefits would be
huge over the long-run. If someone reports a bug in the IDE that is truly an IDE bug,
the IDE can be fixed and a patch released and you would get that fix for all personalities.
If there is a bug in a personality, just update the personality. If the fix touches
both, then both parts can be updated. This independence would be ideal for the consumer.
For example, if there is a bug that is causing IDE performance bottlenecks, the consumer
may be forced to wait for an entirely new release of Borland Developer Studio (BDS),
since fixing those problems may require breaking changes to the interface compatibility
initially released with Delphi 2005. By adopting this model, Borland could start to
release more frequent patches, and also dedicate resources to the appropriate codebase
based on SKU sales and profitability. 
&lt;p&gt;
I could also see a tool used in the Borland R&amp;D department where you would have dependancy
graphs used to tell the team which files would be affected by a specific change. For
example, pretend there is a unit named "CoreIDEServices.pas" that needs a patch. The
developer would fix the patch, run the tool, and it would say that the only file that
needs to be updated is coreide90.bpl. Perhaps a VCL for Win32 bug fix would result
in only the PAS file, DCU file, and corresponding BPL file needing deployment. 
&lt;p&gt;
People have been asking for the VCL to be more of an "a la carte" model forever. This
could be a step in that direction. I'm not advocating that this be done today. Iron
out some of the current problems, but keep an eye on this model. I think it would
serve everyone well.&lt;img width="0" height="0" src="http://www.distribucon.com/blog/aggbug.ashx?id=510" /&gt;</description>
      <comments>http://www.distribucon.com/blog/CommentView,guid,510.aspx</comments>
      <category>Delphi</category>
    </item>
    <item>
      <trackback:ping>http://www.distribucon.com/blog/Trackback.aspx?guid=505</trackback:ping>
      <pingback:server>http://www.distribucon.com/blog/pingback.aspx</pingback:server>
      <pingback:target>http://www.distribucon.com/blog/PermaLink,guid,505.aspx</pingback:target>
      <dc:creator />
      <wfw:comment>http://www.distribucon.com/blog/CommentView,guid,505.aspx</wfw:comment>
      <wfw:commentRss>http://www.distribucon.com/blog/SyndicationService.asmx/GetEntryCommentsRss?guid=505</wfw:commentRss>
      <slash:comments>3</slash:comments>
      <body xmlns="http://www.w3.org/1999/xhtml">Somewhere along the way of installing and
customizing Delphi 2005 with update 2, various 3rd party packages, and customizations,
I lost the ability to view the contents of the Delphi 2005 help file. In order to
get this functionality back, I used this fix:<br /><code><pre>"c:\Program Files\Borland\BDS\3.0\Help\Common\regHelp 7"</pre></code><br />
After this command executed and the help was rebuilt, everything was fine again.<img width="0" height="0" src="http://www.distribucon.com/blog/aggbug.ashx?id=505" /></body>
      <title>Delphi 2005 help repair</title>
      <guid isPermaLink="false">http://www.distribucon.com/blog/PermaLink,guid,505.aspx</guid>
      <link>http://www.distribucon.com/blog/Delphi2005HelpRepair.aspx</link>
      <pubDate>Wed, 30 Mar 2005 15:27:00 GMT</pubDate>
      <description>Somewhere along the way of installing and customizing Delphi 2005 with update 2, various 3rd party packages, and customizations, I lost the ability to view the contents of the Delphi 2005 help file. In order to get this functionality back, I used this fix:&lt;br&gt;
&lt;code&gt;&lt;pre&gt;"c:\Program Files\Borland\BDS\3.0\Help\Common\regHelp 7"&lt;/pre&gt;&lt;/code&gt; 
&lt;br&gt;
After this command executed and the help was rebuilt, everything was fine again.&lt;img width="0" height="0" src="http://www.distribucon.com/blog/aggbug.ashx?id=505" /&gt;</description>
      <comments>http://www.distribucon.com/blog/CommentView,guid,505.aspx</comments>
      <category>Delphi</category>
    </item>
    <item>
      <trackback:ping>http://www.distribucon.com/blog/Trackback.aspx?guid=502</trackback:ping>
      <pingback:server>http://www.distribucon.com/blog/pingback.aspx</pingback:server>
      <pingback:target>http://www.distribucon.com/blog/PermaLink,guid,502.aspx</pingback:target>
      <dc:creator />
      <wfw:comment>http://www.distribucon.com/blog/CommentView,guid,502.aspx</wfw:comment>
      <wfw:commentRss>http://www.distribucon.com/blog/SyndicationService.asmx/GetEntryCommentsRss?guid=502</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">Jeremy North just released version 2 of
his <a href="http://www.alphalink.com.au/~jed/dcm.htm" target="_new">Delphi Configuration
Manager</a> (DCM). It's a tool that helps you optimize your Delphi IDE by creating
profiles that load specific packages. So, if you have one client that uses one set
of packages, and another that uses a different set, you can set up 2 different profiles
and only load the packages that you need depending on which client you're working
on currently. The main feature that I like in this version is that run-time packages
are also available to be controlled in a profile. Give it a look. Very well done.<img width="0" height="0" src="http://www.distribucon.com/blog/aggbug.ashx?id=502" /></body>
      <title>Delphi Configuration Manager 2 released</title>
      <guid isPermaLink="false">http://www.distribucon.com/blog/PermaLink,guid,502.aspx</guid>
      <link>http://www.distribucon.com/blog/DelphiConfigurationManager2Released.aspx</link>
      <pubDate>Thu, 10 Mar 2005 15:51:00 GMT</pubDate>
      <description>Jeremy North just released version 2 of his &lt;a href="http://www.alphalink.com.au/~jed/dcm.htm" target="_new"&gt;Delphi
Configuration Manager&lt;/a&gt; (DCM). It's a tool that helps you optimize your Delphi IDE
by creating profiles that load specific packages. So, if you have one client that
uses one set of packages, and another that uses a different set, you can set up 2
different profiles and only load the packages that you need depending on which client
you're working on currently. The main feature that I like in this version is that
run-time packages are also available to be controlled in a profile. Give it a look.
Very well done.&lt;img width="0" height="0" src="http://www.distribucon.com/blog/aggbug.ashx?id=502" /&gt;</description>
      <comments>http://www.distribucon.com/blog/CommentView,guid,502.aspx</comments>
      <category>Delphi</category>
    </item>
    <item>
      <trackback:ping>http://www.distribucon.com/blog/Trackback.aspx?guid=500</trackback:ping>
      <pingback:server>http://www.distribucon.com/blog/pingback.aspx</pingback:server>
      <pingback:target>http://www.distribucon.com/blog/PermaLink,guid,500.aspx</pingback:target>
      <dc:creator />
      <wfw:comment>http://www.distribucon.com/blog/CommentView,guid,500.aspx</wfw:comment>
      <wfw:commentRss>http://www.distribucon.com/blog/SyndicationService.asmx/GetEntryCommentsRss?guid=500</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <a href="http://desktop.google.com/" target="_new">Google
Desktop Search</a> has made it's way out of beta and is now a released product. It
looks like it has become way more flexible, too. The biggest complaint I had was the
lack of file extension support, which was sort of tied to the fact that there was
no SDK. They re-architected this area, and now have support for <a href="http://desktop.google.com/plugins.html" target="_new">plugins</a> (including,
a <a href="http://desktop.google.com/plugins/trillian.html" target="_new">Trillian
plugin</a>) and allow developers to create plugins via the <a href="http://desktop.google.com/downloadsdksubmit" target="_new">SDK</a>.
More information on developing plugins can be found <a href="http://desktop.google.com/developer.html" target="_new">here</a>.
They also expanded the default set of files that are indexed to include (among others)
MP3 and PDF files. I also <b>really</b> love the DeskBar to gain easy access to searches. 
<p>
My buddy, Rich Werning, and I were talking about some possible plugins that we may
develop after we convert the SDK files to Delphi: 
</p><ul><li>
ZIP plugin - Scan through ZIP files to find items inside a ZIP 
</li><li>
Blog/<a href="http://www.bradsoft.com/feeddemon/index.asp" target="_new">FeedDemon</a> plugin
- Search your locally downloaded blog entries, and have it take you to the original
author's page when an item is found 
</li><li>
Database plugin - Not entirely certain on this one, but if you provided a full connection
string, maybe you could search a DB schema for fields/tables/etc. Or maybe even search
a table for specific text. 
</li></ul><p>
I'll certainly blog anything we do on this front.<img width="0" height="0" src="http://www.distribucon.com/blog/aggbug.ashx?id=500" /></p></body>
      <title>Google Desktop Search released</title>
      <guid isPermaLink="false">http://www.distribucon.com/blog/PermaLink,guid,500.aspx</guid>
      <link>http://www.distribucon.com/blog/GoogleDesktopSearchReleased.aspx</link>
      <pubDate>Wed, 09 Mar 2005 02:48:00 GMT</pubDate>
      <description>&lt;a href="http://desktop.google.com/" target="_new"&gt;Google Desktop Search&lt;/a&gt; has made
it's way out of beta and is now a released product. It looks like it has become way
more flexible, too. The biggest complaint I had was the lack of file extension support,
which was sort of tied to the fact that there was no SDK. They re-architected this
area, and now have support for &lt;a href="http://desktop.google.com/plugins.html" target="_new"&gt;plugins&lt;/a&gt; (including,
a &lt;a href="http://desktop.google.com/plugins/trillian.html" target="_new"&gt;Trillian
plugin&lt;/a&gt;) and allow developers to create plugins via the &lt;a href="http://desktop.google.com/downloadsdksubmit" target="_new"&gt;SDK&lt;/a&gt;.
More information on developing plugins can be found &lt;a href="http://desktop.google.com/developer.html" target="_new"&gt;here&lt;/a&gt;.
They also expanded the default set of files that are indexed to include (among others)
MP3 and PDF files. I also &lt;b&gt;really&lt;/b&gt; love the DeskBar to gain easy access to searches. 
&lt;p&gt;
My buddy, Rich Werning, and I were talking about some possible plugins that we may
develop after we convert the SDK files to Delphi: 
&lt;ul&gt;
&lt;li&gt;
ZIP plugin - Scan through ZIP files to find items inside a ZIP 
&lt;li&gt;
Blog/&lt;a href="http://www.bradsoft.com/feeddemon/index.asp" target="_new"&gt;FeedDemon&lt;/a&gt; plugin
- Search your locally downloaded blog entries, and have it take you to the original
author's page when an item is found 
&lt;li&gt;
Database plugin - Not entirely certain on this one, but if you provided a full connection
string, maybe you could search a DB schema for fields/tables/etc. Or maybe even search
a table for specific text. 
&lt;/ul&gt;
&lt;p&gt;
I'll certainly blog anything we do on this front.&lt;img width="0" height="0" src="http://www.distribucon.com/blog/aggbug.ashx?id=500" /&gt;</description>
      <comments>http://www.distribucon.com/blog/CommentView,guid,500.aspx</comments>
      <category>Delphi</category>
    </item>
    <item>
      <trackback:ping>http://www.distribucon.com/blog/Trackback.aspx?guid=498</trackback:ping>
      <pingback:server>http://www.distribucon.com/blog/pingback.aspx</pingback:server>
      <pingback:target>http://www.distribucon.com/blog/PermaLink,guid,498.aspx</pingback:target>
      <dc:creator />
      <wfw:comment>http://www.distribucon.com/blog/CommentView,guid,498.aspx</wfw:comment>
      <wfw:commentRss>http://www.distribucon.com/blog/SyndicationService.asmx/GetEntryCommentsRss?guid=498</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">I needed to create a custom TField class
to handle some special processing recently. It was surprisingly easy to get this working: 
<br />
1. First, create a descendant TField class and put it in a run-time package. <pre><code><b>type</b> TDrmBCDField
= class(TBCDField) <font color="#003399"><i>//override whatever methods you need here</i></font><b>end</b>; </code></pre><br />
2. Next, create a registration unit and place that in a design-time package. This
unit has nothing more than this: <pre class="sourcecode"><code><b>unit</b> uDrmBCDFieldReg; <b>interface</b><b>procedure</b><b>Register</b>; <b>implementation</b><b>uses</b> uDrmBCDField,
DB; <b>procedure</b><b>Register</b>; <b>begin</b> RegisterFields([TDrmBCDField, TDrmFMTBCDField]); <b>end</b>; <b>end</b>. </code></pre><p>
After compiling these packages, you can now get the new custom TField type to display
when selecting "New Field..." in the Dataset designer. However, this doesn't address
places where you don't use persistent fields, and it doesn't address the (IMO) more
commonly used "Add Fields..." or "Add All Fields" context menu items. In order to <b>always</b> use
your new custom class, you need to add code like this to your run-time package. By
doing this, both the Delphi IDE and your code at run-time will pick up the proper
field class type. I had to use code like this because Delphi 6 doesn't have assignable
const permissions in the DB.pas unit. 
<br /></p><pre class="sourcecode"><code><b>var</b> FieldClass: ^TFieldClass = <b>nil</b>; <b>initialization</b> FieldClass
:= @DefaultFieldClasses[ftBCD]; FieldClass^ := TTIPBCDField; <b>finalization</b><b>if</b> Assigned(FieldClass) <b>then</b> FieldClass^
:= TBCDField; <b>end</b>. </code></pre><p>
Notes: 
</p><ul><li>
There is a <a href="http://qc.borland.com/wc/qcmain.aspx?d=2659" target="_new">bug
in Delphi 6</a> that causes occasional AVs when rebuilding packages that use RegisterFields.
According to <a href="http://groups-beta.google.com/group/borland.public.delphi.vcl.components.writing/browse_frm/thread/8a3d7dabe7d0bc36/68506515261179a4?q=delphi+registerfields+av#68506515261179a4" target="_new">this
Google post by Vitaliy Lyanchevskiy</a>, you can use RegisterClasses during design
and development to get around this problem. 
</li><li>
Instead of DefaultFieldClasses, you can override TDataset.GetFieldClass if you want
specific field types to be used at a TDataset-level. 
</li></ul><img width="0" height="0" src="http://www.distribucon.com/blog/aggbug.ashx?id=498" /></body>
      <title>Custom TField classes in Delphi</title>
      <guid isPermaLink="false">http://www.distribucon.com/blog/PermaLink,guid,498.aspx</guid>
      <link>http://www.distribucon.com/blog/CustomTFieldClassesInDelphi.aspx</link>
      <pubDate>Mon, 07 Mar 2005 22:48:00 GMT</pubDate>
      <description>I needed to create a custom TField class to handle some special processing recently. It was surprisingly easy to get this working:
&lt;br&gt;
1. First, create a descendant TField class and put it in a run-time package. &lt;pre&gt;&lt;code&gt; &lt;b&gt;type&lt;/b&gt; TDrmBCDField
= class(TBCDField) &lt;font color="#003399"&gt;&lt;i&gt;//override whatever methods you need here&lt;/i&gt;&lt;/font&gt; &lt;b&gt;end&lt;/b&gt;; &lt;/code&gt;&lt;/pre&gt;
&lt;br&gt;
2. Next, create a registration unit and place that in a design-time package. This
unit has nothing more than this: &lt;pre class="sourcecode"&gt;&lt;code&gt; &lt;b&gt;unit&lt;/b&gt; uDrmBCDFieldReg; &lt;b&gt;interface&lt;/b&gt; &lt;b&gt;procedure&lt;/b&gt; &lt;b&gt;Register&lt;/b&gt;; &lt;b&gt;implementation&lt;/b&gt; &lt;b&gt;uses&lt;/b&gt; uDrmBCDField,
DB; &lt;b&gt;procedure&lt;/b&gt; &lt;b&gt;Register&lt;/b&gt;; &lt;b&gt;begin&lt;/b&gt; RegisterFields([TDrmBCDField, TDrmFMTBCDField]); &lt;b&gt;end&lt;/b&gt;; &lt;b&gt;end&lt;/b&gt;. &lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;
After compiling these packages, you can now get the new custom TField type to display
when selecting "New Field..." in the Dataset designer. However, this doesn't address
places where you don't use persistent fields, and it doesn't address the (IMO) more
commonly used "Add Fields..." or "Add All Fields" context menu items. In order to &lt;b&gt;always&lt;/b&gt; use
your new custom class, you need to add code like this to your run-time package. By
doing this, both the Delphi IDE and your code at run-time will pick up the proper
field class type. I had to use code like this because Delphi 6 doesn't have assignable
const permissions in the DB.pas unit. 
&lt;br&gt;
&lt;pre class="sourcecode"&gt;&lt;code&gt; &lt;b&gt;var&lt;/b&gt; FieldClass: ^TFieldClass = &lt;b&gt;nil&lt;/b&gt;; &lt;b&gt;initialization&lt;/b&gt; FieldClass
:= @DefaultFieldClasses[ftBCD]; FieldClass^ := TTIPBCDField; &lt;b&gt;finalization&lt;/b&gt; &lt;b&gt;if&lt;/b&gt; Assigned(FieldClass) &lt;b&gt;then&lt;/b&gt; FieldClass^
:= TBCDField; &lt;b&gt;end&lt;/b&gt;. &lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;
Notes: 
&lt;ul&gt;
&lt;li&gt;
There is a &lt;a href="http://qc.borland.com/wc/qcmain.aspx?d=2659" target="_new"&gt;bug
in Delphi 6&lt;/a&gt; that causes occasional AVs when rebuilding packages that use RegisterFields.
According to &lt;a href="http://groups-beta.google.com/group/borland.public.delphi.vcl.components.writing/browse_frm/thread/8a3d7dabe7d0bc36/68506515261179a4?q=delphi+registerfields+av#68506515261179a4" target="_new"&gt;this
Google post by Vitaliy Lyanchevskiy&lt;/a&gt;, you can use RegisterClasses during design
and development to get around this problem. 
&lt;li&gt;
Instead of DefaultFieldClasses, you can override TDataset.GetFieldClass if you want
specific field types to be used at a TDataset-level. 
&lt;/ul&gt;
&lt;img width="0" height="0" src="http://www.distribucon.com/blog/aggbug.ashx?id=498" /&gt;</description>
      <comments>http://www.distribucon.com/blog/CommentView,guid,498.aspx</comments>
      <category>Delphi</category>
    </item>
    <item>
      <trackback:ping>http://www.distribucon.com/blog/Trackback.aspx?guid=482</trackback:ping>
      <pingback:server>http://www.distribucon.com/blog/pingback.aspx</pingback:server>
      <pingback:target>http://www.distribucon.com/blog/PermaLink,guid,482.aspx</pingback:target>
      <dc:creator />
      <wfw:comment>http://www.distribucon.com/blog/CommentView,guid,482.aspx</wfw:comment>
      <wfw:commentRss>http://www.distribucon.com/blog/SyndicationService.asmx/GetEntryCommentsRss?guid=482</wfw:commentRss>
      <slash:comments>8</slash:comments>
      <body xmlns="http://www.w3.org/1999/xhtml">We currently use <a href="http://www.multilizer.com" target="_new">Multilizer</a> in
our product. However, we really don't use all of the features. It's use is pretty
confined to "dynamically display messages" and "translate captions/labels on forms".
Using Delphi 6 with Multilizer 5, things work fairly well. 
<p>
We are also preparing the switch to Delphi 2005 in the next couple weeks. After contacting
Multilizer, it turns out that there is no support for Multilizer 5 with Delphi 2005,
and as a result, we would be required to spend <b>many</b> thousands of dollars to
upgrade to Multilizer 6. That isn't a very attractive option. As of this writing,
Multilizer will be thrown out of here, never to return. I'm investigating using Delphi's
built-in Integrated Translation Environment (ITE) at the moment. I remember there
were all sorts of problems with ITE early on (like in the Delphi 3/4 days). I'm hoping
enough work has been done in this area to make it usable for our fairly simple needs.
If not, we're writing our own tools to do this. 
</p><p>
I believe component vendors should provide version compatible releases for newer versions
of Delphi. Most component vendors actually do this quite well. I also believe that
when companies try to force you into spending thousands of dollars, you should look
to replace them immediately.<img width="0" height="0" src="http://www.distribucon.com/blog/aggbug.ashx?id=482" /></p></body>
      <title>Multi-language support</title>
      <guid isPermaLink="false">http://www.distribucon.com/blog/PermaLink,guid,482.aspx</guid>
      <link>http://www.distribucon.com/blog/MultilanguageSupport.aspx</link>
      <pubDate>Fri, 25 Feb 2005 17:28:00 GMT</pubDate>
      <description>We currently use &lt;a href="http://www.multilizer.com" target="_new"&gt;Multilizer&lt;/a&gt; in
our product. However, we really don't use all of the features. It's use is pretty
confined to "dynamically display messages" and "translate captions/labels on forms".
Using Delphi 6 with Multilizer 5, things work fairly well. 
&lt;p&gt;
We are also preparing the switch to Delphi 2005 in the next couple weeks. After contacting
Multilizer, it turns out that there is no support for Multilizer 5 with Delphi 2005,
and as a result, we would be required to spend &lt;b&gt;many&lt;/b&gt; thousands of dollars to
upgrade to Multilizer 6. That isn't a very attractive option. As of this writing,
Multilizer will be thrown out of here, never to return. I'm investigating using Delphi's
built-in Integrated Translation Environment (ITE) at the moment. I remember there
were all sorts of problems with ITE early on (like in the Delphi 3/4 days). I'm hoping
enough work has been done in this area to make it usable for our fairly simple needs.
If not, we're writing our own tools to do this. 
&lt;p&gt;
I believe component vendors should provide version compatible releases for newer versions
of Delphi. Most component vendors actually do this quite well. I also believe that
when companies try to force you into spending thousands of dollars, you should look
to replace them immediately.&lt;img width="0" height="0" src="http://www.distribucon.com/blog/aggbug.ashx?id=482" /&gt;</description>
      <comments>http://www.distribucon.com/blog/CommentView,guid,482.aspx</comments>
      <category>Delphi</category>
    </item>
    <item>
      <trackback:ping>http://www.distribucon.com/blog/Trackback.aspx?guid=480</trackback:ping>
      <pingback:server>http://www.distribucon.com/blog/pingback.aspx</pingback:server>
      <pingback:target>http://www.distribucon.com/blog/PermaLink,guid,480.aspx</pingback:target>
      <dc:creator />
      <wfw:comment>http://www.distribucon.com/blog/CommentView,guid,480.aspx</wfw:comment>
      <wfw:commentRss>http://www.distribucon.com/blog/SyndicationService.asmx/GetEntryCommentsRss?guid=480</wfw:commentRss>
      <slash:comments>3</slash:comments>
      <body xmlns="http://www.w3.org/1999/xhtml">Using Mike Scott's old Netscape plugin
SDK, I've been very successful in getting applications deployed with a variety of
deployment options (thin client EXE, IE ActiveX/ActiveForm, and Netscape plugin).
However, the Plugin SDK has been updated several times, and I haven't gone back to
keep the original Delphi port up to date. Add to this mix the "other browsers" on
the market that also need to be supported, and I was left wondering which direction
to go. 
<p>
The result was that I found the <a href="http://www.iol.ie/~locka/mozilla/plugin.htm" target="_new">Netscape
ActiveX plugin</a> that allows ActiveX controls to be used inside Netscape-compatible
browsers. So far, the results have been mixed, but I like the idea of having single-sourced
code that compiles to the same deployment option (ActiveX), and let the browsers worry
about how to handle it.<img width="0" height="0" src="http://www.distribucon.com/blog/aggbug.ashx?id=480" /></p></body>
      <title>Netscape ActiveX plugin</title>
      <guid isPermaLink="false">http://www.distribucon.com/blog/PermaLink,guid,480.aspx</guid>
      <link>http://www.distribucon.com/blog/NetscapeActiveXPlugin.aspx</link>
      <pubDate>Tue, 22 Feb 2005 17:56:00 GMT</pubDate>
      <description>Using Mike Scott's old Netscape plugin SDK, I've been very successful in getting applications deployed with a variety of deployment options (thin client EXE, IE ActiveX/ActiveForm, and Netscape plugin). However, the Plugin SDK has been updated several times, and I haven't gone back to keep the original Delphi port up to date. Add to this mix the "other browsers" on the market that also need to be supported, and I was left wondering which direction to go.
&lt;p&gt;
The result was that I found the &lt;a href="http://www.iol.ie/~locka/mozilla/plugin.htm" target="_new"&gt;Netscape
ActiveX plugin&lt;/a&gt; that allows ActiveX controls to be used inside Netscape-compatible
browsers. So far, the results have been mixed, but I like the idea of having single-sourced
code that compiles to the same deployment option (ActiveX), and let the browsers worry
about how to handle it.&lt;img width="0" height="0" src="http://www.distribucon.com/blog/aggbug.ashx?id=480" /&gt;</description>
      <comments>http://www.distribucon.com/blog/CommentView,guid,480.aspx</comments>
      <category>Delphi</category>
    </item>
  </channel>
</rss>