Taking a break from the frustration of updating my Android app I wanted to try out the free community addition of Delphi 15. I was so pleased with the look and feel I decided to try to update some of my old freeware apps.
The first issue I ran into was installing the Project JEDI components which are a big part of my Delphi apps. The community edition does not allow command line compiling. Luckily I stumbled across this video which explains in detail how to get around this limitation:
Delphi Community Edition and manually installing JCL and JVCL
The first app I loaded was the Freekin modeler code which uses a couple of JEDI components. After some hiccups with the library paths it compiled and ran beautifully.
Next up was PK_calc, also fairly simple. I spent more time creating the program icons than actual coding.
The next project, Half-life calculator, was more challenging. This project added a couple of additional components, SynPDF and NextGrid. I was able to find the updated source code for SynPDF on gitHub. One problem I couldn’t solve was how to change the font to bold. The line Canvas.SetFont(‘Arial’,11,[fsBold]); throws an E2250 error: ”There is no overloaded version of ‘SetFont’ that can be called with these arguments”. Even though the reset function called with an empty parameter works fine: Canvas.SetFont(‘Arial’,11,[]);. Oh well, not an app killer, just a disappointment.
After searching old emails on my old PC I found my login credentials for Berg software and was able to download the latest version of NextGrid I am incredibly thankful that Bojan Nikolic has maintained this wonderful component over many years.
With the necessary components installed and no syntax errors in my code I started testing the software. I noticed that changing the serum level units dropdown did not change the results. It took awhile but I found there was a double reference to frmMain. This was not an issue with older versions of Delphi, but 15 bypassed the block of code without flagging an error. I wish the Developer plugin for WordPress worked so I could display the code. But basically within function frmMain.Calc_PK there was reference to the dropdown as frmMain.cboUnits. Changing this to simply cboUnits fixed the problem.
I’ve uploaded the updated versions to the website. I let my Windows code signing certificate lapse last year because it costs $250 a year, more than I make from this website. So, if you do download the new versions you will receive this warning from micro$oft:
Bottom line, run anyway, but you may need admin privileges. Please support the site so I can afford to renew my code cert and get rid of the big scary warning.
Revisiting an old friend
I recently discovered DosBox-X, an emulator which allows one to run old DOS apps on Windows 10. I was able to revisit an old friend, TurboBasic.
What a rush of nostalgia and happy memories. TurboBasic was the first real compiler I used. Unlike micro$oft’s Quick Basic, TB compiled into a stand-alone app with no runtime libraries required. And the executables TB produced ran very fast. I have an itching desire to update the AbPK for DOS app, just for kicks because no one will ever use it. I loaded the code from 1992 into TB, and with some changes to the configuration, it compiled and ran. Even the graphing function worked. But printing a consult brings it to a crashing halt. I will probably need to change it around to create a .txt file which can then be loaded into Notepad and printed.
Borland dropped TurboBasic when they changed to a full Windows shop. For those unfamiliar with the history. the brilliant Bob Zale wrote BASIC/Z, then sold it to Borland where it would become TurboBasic, Bob also went to work at Borland. When Borland shelved TurboBasic Bob bought the rights back and renamed it to PowerBasic where he continued to develop it. I purchased PB and kept it up for awhile, but it just didn’t have the zing of TB. Sadly Bob passed away in 2012, and his software died with him. I hope to avoid the same fate for this website’s line of software.