thecave


My hideout on the Internet

wpsCsvParser Fix

A new version of the wpsCsvParser has been posted to the White Peak Software web site. Thanks to Stephan Hilchenbach for providing the fix to the bug that caused the parser to ignore the last field on a line if the field is empty.

Continue reading →


Video Tutorials for Delphi

Nick Hodges, Delphi Product Manager, has been busy for the last 22 days piecing together the Thirty Camtasia Demos in Thirty Days for Delphi. These short videos are the perfect tutorials for those new to Delphi.

Continue reading →


Removing Child Nodes Dynamically using JavaScript

JavaScript once again kicked my butt last night. Well, it was the combination of JavaScript and IE because my initial code worked fine in Firefox. Here’s the story.

I have a search form that uses AJAX to retrieve search results based on user submitted criteria. The results are displayed in a table dynamically created using JavaScript. The problem, however, was the results were being appended to the end of the existing table data. I needed a way to clear the table contents prior to adding the latest search results.

My first approach was to set the innerHTML property of the TBODY element from the results table to a zero-length string. For example:

<pre>
var ctrl;
ctrl = document.getElementById(‘searchTBody’);
ctrl.innerHTML = ‘’;
</pre>

This works fine in Firefox but it causes problems under IE. A different approach is needed. A couple of google searches turned up the removeChild method. Using it you can iterate through the childNodes collections to remove each child within the element. So I wrote the following JavaScript function:

<pre>
function removeChildNodes(ctrl)
{
while (ctrl.childNodes[0])
{
ctrl.removeChild(ctrl.childNodes[0]);
}
}
</pre>

To remove each child node from an element, get a reference to the element and pass it to the removeChildNodes function. For example:

<pre>
var ctrl;
ctrl = document.getElementById(‘searchTBody’);
removeChildNodes(ctrl);
</pre>

This approach works for IE and Firefox.

Continue reading →


CSV Parser for Delphi

I updated my Delphi CSV Parser to include .NET support. TwpsCsvParser can now be compiled for Win32 and .NET applications using Delphi. To download the code with sample Win32 and .NET applications, visit the Delphi CSV Parser page at the White Peak Software web site.

Don’t have Delphi? Visit http://www.turboexplorer.com/ and download the FREE Turbo Delphi Explorer or Turbo Delphi for .NET Explorer.

Continue reading →


FREE 3rd Party Tool bundle with BDS 2006

You have BDS 2006 right? Did you see the latest marketing campaign that includes the following 3rd party applications (full versions, not trial)?

Castalia
CodeHealer
Beyond Compare Differ
BuilderBooster(tm)

Registered users of BDS 2006 are also entitled to the FREE bundle. Just go to the download site and click FREE 3rd party tools.

http://www.borland.com/downloads/registered/download_bds.html

I’ve been a Beyond Compare user for years. It’s a great piece of software. Not only can you compare files, but you can compare directories, and, get this, compare FTP sites. The ability to compare with FTP sites is awesome.

Thanks for the 3rd party bunlde DevCo!

Continue reading →


From Delphi to C# and Back Again

I remember when I first started working with C#. A friend at Microsoft showed it to me at PDC in 2000. He just happened to be the same guy who introduced me to Delphi a few years earlier, and I remember him saying “You’re going to love this.” And I did. C# made programming fun again for me after being stuck in the VB world for a couple of years. That fun feeling I had with C# was similar to the fun feeling I had when I was programming with Delphi during the mid-90s.

I enjoyed C# for the years that followed. Of course all the work was web-based. After starting White Peak Software a customer asked me to develop a prototype version of a desktop application. The customer also asked that I use VB.NET, so I gave VB.NET a try. However I stepped away from the project after completing the prototype. Working in VB.NET was an awful experience for me and I now refuse to write any programs using VB.NET.

What was equally as awful was writing a desktop application in .NET (and I have written my fair share of them as well). Sure, it can be done but not with the speed and easy found with Delphi and the VCL. I bought and used Delphi 2005 for the next desktop application I wrote and I haven’t looked back. Delphi is back as my language of choice, and the Borland Developer Studio is my IDE of choice for both Delphi and C# development.

The VCL is the magical piece that makes writing Windows desktop application so easy. Sure I love Delphi as a language. Pascal has always been my favorite. I cut my programming teeth on Pascal back in the early 80’s. C# is a nice language too especially if you prefer C-style languages, and it’s my second programming language of choice. But VCL features such as TFrame and TAction make writing a Windows desktop application make easier compared to .NET.

Today I do more Delphi programming than C# and I couldn’t be happier. My customers are happier too.

Continue reading →


Gluten-Free Gourmet Dessert Recipes Book

Continue reading →


When in Rome

Here’s a nice camera phone picture of Melanie in Rome taking earlier this week. Wish I could have gone with her.

Continue reading →


Petition to Reverse WinFX .NET 3.0 Naming

Microsoft recently announced .NET 3.0 which is basically the .NET 2.0 Framework with the WinFX library. This has caused a lot of confusion in the software developer community and is in my opinion a stupid move by Microsoft. Turns out I’m not alone in thinking this was a bad move. A petition has been started to reverse the WinFX .NET naming.

Continue reading →


Delphi Oktoberfest Video

The Delphi Oktoberfest video is a funny video from the 1995 Borland Developer Conference. The message still applies today.

Continue reading →