Login to participate
Register   Lost ID/password?
Louis Kessler's Behold Blog » Blog Entry           prev Prev   Next next

Friday, December 1, 2006 - Fri, 1 Dec 2006

Developing a Find Tool is pretty straightforward … or so I thought. It turns out that the “hard” part is easy, and the “easy” part is hard.

The “hard” part I thought was to do the file search efficiently. I had some Delphi code I found long ago to do file searching and implementing it and tweaking it only took a couple of hours. Windows XP’s horrible search tool takes about 30 seconds to go through the 300,000 files on my Computer and find my 500 GEDCOM and Behold files. Who knows what it’s doing as it churns away. Windows 98’s search tool was better looking, much easier to use and somewhat quicker. The Delphi file searching code after tweaking finds all the GEDCOMs and Behold files on my computer in about 30 seconds the first time, and about 8 seconds after that. Windows must cache results from the function calls that the Delphi program makes. It takes about twice as long if you ask for certain text in the GEDCOMs, and that’s less extra time than I thought it would need. So that was easy.

The Find window was supposed to be the “easy” part. Setting up the Window is simple. But it’s the details that take time. You want the results to include file size and date modified. And you want to be able to sort by the columns. But the file size, to match Windows Explorer, should not be “2831564″, but should be “2,765 KB”. Once you do that, it is a character string, and all of a sudden, “2,765 KB” is less than “3 KB”. And did you ever try to sort dates that look like “06 Mar 2005 9:48 AM”?

Then I have to handle the unexpected complexities of what to do with the results. What will double-clicking do, dragging and dropping, and do I want a right-click menu with options such as “Load into Behold”, “Properties” and “View file”? And most frustrating of all is that my nicely designed window is all filled up and I don’t have a good place to put the “Help” button.

So a one-day implementation of this will turn into a few days. But that’s the way it goes. It will be a very useful feature.

No Comments Yet

Leave a Comment

You must login to comment.

Login to participate
Register   Lost ID/password?