On July 13, Borland will host the 24 Hours of Delphi. While it might not be as good as the TV show "24", it does look like it will be a lot of fun.
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.
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 prevents multiple components from being selected simultaneously, which means you can't create Component Templates like this.
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.
I saw the end of a TV newscast that mentioned mobile video, so I set to Googlin'. What I found is beyond awesome. I will definitely be picking something up in this area. When I do, I'll be sure to blog about my experiences with whatever I choose.
So much homework to do, so little time to do it. Does anyone have any recommendations or experience with these things?
With apologies to Edsger Dijkstra, I bring you a much smaller treatise on the benefits of using Range Checking. As many of you are aware from previous entries on the topic, I have been dealing with issues relating to the PopupMode off and on for a while now. I went back to the drawing board on the problem I talked about where using API subclassing to intercept paint messages for all components on a screen was broken due to PopupMode. I rewrote my component to use VCL subclassing (i.e. assign a procedure to the WindowsProc property), and things are much better (after much trial and tribulation). Part of the trials and tribulations I was having were due to accessing a dynamic array beyond the bounds of the array. It was resulting in 'Invalid Pointer Operation" error messages when shutting down the application. Debugging didn't reveal much interesting, and not much to chase further either. However, I realized I didn't have Range Checking or Overflow Checking turned on in my project. Turning these options on and running again showed me immediately where the code was broken, and allowed me to fix the problem quickly. Without this check, I was overwriting some memory and this resulted in the Invalid Pointer error later on.
So, long story, short: Range Checking can help you quite a bit during development. I don't necessarily advocate leaving it on for production code, though.
I was at a charity golf outing for the Bryon Riesch Spinal Cord Injury Research foundation yesterday. As I walked up to hole 13 at the Western Lakes golf course, I see it is a 168 yard par 3, with the pin basically in the center of the green and a slight tailwind, and proceed to hit the purest 8 iron I've ever hit. From the moment it left my club face, I knew it had a real good chance. I watched it stay on line, hit about 5 yards short of the hole, take a bounce and roll for a little bit and then I saw the ball disappear. It was an absolute rush to see this. I was elated beyond description.
After the round is over, I went to the clubhouse and bought a bunch of drinks, and bid on some silent auction items (I get to go backstage to meet Styx in person for the 2nd year in a row!! ). As we all sit down to dinner, the director grabs the microphone and says that he just got off the phone with the lawyers and that they are happy to announce that I won a 2005 Mustang Convertible, a trip to Scotland to play St. Andrew's, and some other prizes!!!!!!!!! (I believe that's justifiable use of multiple exclamation marks. ) It turns out that all players in the event were covered by an insurance policy that they bought to pay out prizes on an ace. I'll be signing the affidavits soon, and should have all of the prizes shortly thereafter. I'm still in a haze. Oh, and to be certain, I bid like there was no tomorrow in the regular auction. There is no way I want that karma train pulling away from me.
I'm obviously ecstatic, but I would especially like to thank everyone in the foundation for putting on a great event, and facilitating the prize package payout. I would like to thank them very much for everything that they did. Rest assured, I will be coming back time and time again.
During conversion of our application suite to Delphi 2005, I ran into a very irritating bug where a form was flashing extremely 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 Camtasia 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.
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.
Some days, I long for the Ctrl-S / Ctrl-Q days again.
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 AutoUpgrader 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.
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:
// GetVersionInfo is a locally defined function to retrieve version info from the current Application
AutoUpgrader1.VersionNumber := GetVersionInfo;
I recently had the need to release an application using an installer. The install had fairly simple needs, so I gave the free Nullsoft Scriptable Install System for a spin. It's certainly a little different to set things up compared to other installers, but it works flawlessly. My installer has a Modern UI, installs files, writes registry entries, has separate component install options, has a custom page that writes to an INI file depending on install options, and creates an uninstaller. The script syntax wasn't exactly intuitive, but the examples and documentation were more than adequate to get me up and running with minimal troubles. It also looks like I will be able to grow into this installer since it has some more advanced features (callbacks, plugins, etc.) should I need them. I was able to get the installer working in FinalBuilder 2, but I see that it is natively supported in FinalBuilder 3, too.
Give it a try, and I'm betting you'll like it, too.
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.
To work around this, delete the following registry entries:
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
|