Showing posts from 2021

CodeSnip 4.19.0 Released

I've just released v4.19.0 of CodeSnip. You can get it from GitHub . For the low down see the announcement on the CodeSnip blog.

Code Snippets Database HOTFIX 2.1.1 released

Embarrassed face emoji! Following the release of v2.1.0 of the Code Snippets Database  a few days ago, I've just run CodeSnip in the debugger only to find it was detecting and gently ignoring some errors when loading the release! So I've rushed out a hotfix: v2.1.1. If you followed my advise a few days back and updated to v2.1.0, you really need to get this hotfix. Grab it from the project's GitHub release page for hotfix 2.1.1 . Whoops!

Released v2.1.0 of the Code Snippets Database

Just completed v2.1.0 of the Code Snippets Database collection . This version tidies up the meta-data to make it more consistent and to leave behind some old legacy data that dates back to the CodeSnip program's early days. Also fixed some minor bugs and updated a few descriptions. No new snippets though. I advise any CodeSnip users to update since future CodeSnip releases will probably drop backwards compatibility with the now deprecated v2.0.x file format. Information on how to update can be found from within CodeSnip by choosing the Database | Install or Update DelphiDabbler Snippets Database  menu option. You can get the new version and read the full change log on the project's GitHub release page .

Problems with server: 2021/12/12 update - Not For Sale!

UPDATE: all fine now. Difficulties with getting back on line are getting worse. Now,  you may be seeing this page if you try to access either or Firstly, I've not  surrended the domain name, and I haven't forgotten to pay the bills! I still own it. This problem affects because I've changed it to map to . The problem is therefore with the domain and could be one of two issues: The change I made to the nameservers to reference GitHub Pages seems to be propagating very slowly  or There's a problem at my domain hosting company - there's a DNS error being reported that I don't understand and that I'm trying to get tech support to address. Unfortunately it looks like the site won't be available for at least another 24 to 48 hrs. Could even be worse if the suspected DNS problem is real and can't be resolved easily. Watch this space. F

Problems with server: 2021/12/10 update

UPDATE: all fine now Following on from yesterday's post I have decided to move to a new server. Since I develop the website on GitHub, and the site is to all intents and purposes mirrored on GitHub I'm changing my DNS record to use as custom domain for All the content is already there leaving me nothing left to move. While we're waiting for the changes to propagate, & (and their http:// equivalents) could lead you to either the old or new servers. You can tell which because pages served from the old server have a great big yellow warning displayed at the top of each page, while pages served from GitHub Pages don't have the warning (but may have a red cookie message pop up). Help Needed If, by 12:00 UTC tomorrow (2021/12/11) you're still seeing the old server, I would be very grateful if you would let me know, either by commenting below, o

Problems with server

UPDATE: all fine now. I'm experiencing problems at the web server (404 errors where none existed previously, for e.g.) and cannot contact the hosting company to try to resolve it. Until I can sort out a new host, please use the mirror site at I may end up pointing at the GitHub Pages site permanently if I can't resolve this issue. Watch this space.

Things I like about Pascal [part 1]: == ≠ =

One of the things that pleases me no end about Pascal , like Algol before it, is its use of =  to mean = , and  not  as an assignment operator. For that we have := . Dunno if it's my maths background, but I find languages that use the equals sign as an assignment operator to be really, really annoying. Now good old BASIC gets it right, in that it uses  =  to test for equality but combines =  with the  LET  prefix for assignment. As in : LET x = 42 You know, just like you do in maths . Except that many BASIC implementations make LET  optional! But in the curly brace languages (and others), the misuse of =  irritates me beyond reason. Especially so when they then go and define == to mean "is equal to" when there's a perfectly good = sign just begging to be used. I find this ridiculous - and I'm in good company: A notorious example for a bad idea was the choice of the equal sign to denote assignment. It goes back to Fortran in 1957, and has blindly been copied by

404 errors on Articles pages fixed

Last week I noticed that accessing any of the articles on from the Articles menu resulting in a 404 error on the main site, while everything was OK on the GitHub Pages mirror I use for testing. I hate to imagine how long it had been broken. Anyhow a simple tweak to the .htaccess file seems to have fixed things. A forced page refresh may be needed if the error persists.

Added Demos to Delphi Tips repo

There were some well hidden demos for a smattering of the tips on the Delphi Tips microsite that had been mouldering away over on a long forgotten Assembla repo. On rediscovering them the other day I copied them over to the demos directory of the delphi-tips repo on GitHub. Like the tips, the demos are quite elderly, but some of them may still prove useful. Of course, if anyone would like to add any more, you're welcome to fork away.

CodeSnip bug fix v4.18.1 released

Just released a bug fix update for  CodeSnip  - v4.18.1. Full details over on the CodeSnip Blog . To skip the blurb and just download it, go to the releases page on GitHub or discuss it here .

System Information Unit 5.7.1 released

I've just released v5.7.1 of my System Information Unit . This version fixes a minor bug in v5.7.0's detection of various Windows 11 preview versions. It shouldn't ever manifest itself, but better safe than sorry. I've also tidied up the code relating to Windows 10 21H2 now that it's out and the build number is confirmed. Finally there's a little bit of refactoring. No a big deal, but to be safe I recommend downloading it. PJSysInfo v5.7.1 - 64 bit FMX demo

Time to fix some bad UI design (Thanks, DelphiCon!)

Well, my first DelphiCon is over I've got to say I enjoyed it. Thanks to Jim McKeeth & the team for all their work arranging it. I found several of the presentations rather stimulating. One, however, has resulted in me having to do some work, damn it. Which one? One, by Ray Konopka called How Tab Controls Can Ruin Desktop UX is which one. I must say though that, despite making me feeling embarrassed, this was one of my favourite presentations at DelphiCon. For some time I've thought that the multi row tabs in the CodeSnip Preferences dialogue box were confusing. Take a look: I dislike the way that the tab lines rearrange themselves when you click on one of the tabs on the top rows. Hell, even I get confused using this dialogue, and I wrote the damn thing. This has been niggling me literally for years, but never got beyond the "must fix that one day" stage until Ray heaped opprobrium upon such aberrations in front of the whole world (well, in front of Delphi

Feelin' My Age (part 1): is 20 next year!

I've been feeling my age lately for several reasons. Maybe, I thought, it would be therapeutic to share! Reason 1 is that it just dawned on me that my website, had been around since the early 2000s. So I checked the internet archive, and sure enough, the domain was registered, and the holding page was up, on or before 2002/10/17. So it's 20 years old in just under a year's time. Must remember to celebrate! Party? Video? Endless self indulgent blog posts? Who knows! Here's the first recorded page. It's the web host's holding page. Not very inspiring, but it was a start: The first page with content was snapped by the Wayback Machine on 2002/11/19. Here it is, sans title image: Interestingly, the colour scheme hasn't changed much in the intervening years. And, e mbarrassingly, the layout didn't change much until it's overhaul last year. Here's the last internet archive snapshot of the old site from 2020/05/10:

DelphiCon 2021 is almost upon on us

I'm looking forward to DelphiCon 2021 which starts next week: Tues 16th November, to be precise. The first session is at 14:30, UK time (UTC+0). It's my first one, so I'm curious as to how I'll find it. In the time I have available I'll be "attending" about 50% of the sessions, but that's about 90% of the ones that interest me the most. Will your virtual self be there? Still not too late to book . It's free just now , but prices go up after15th November, i.e. after  TOMORROW!

Focus On: Deleaker - a Delphi, C++ & C# Memory Leak Detector

A week or so ago Artem Razin got in touch with me to ask if I'd take a look at his  Deleaker  program and mention it in my blog. I agreed and this blog is about how I've been using it and what I've discovered. This is by no means a definitive account of how to use the program and I'm far from an expert user. For the final word on this program, see the Deleaker docs . You can get a free trial and pricing info from the Deleaker Website . Deleaker stand-alone window Disclosure This is the first blog I've written about a commercial third party program. For the sake of transparency I want to disclose that  I received a free license for this product from Artem, for which I'm grateful. Offer to other developers I'm happy to offer to blog about other useful development software (or Delphi libraries) from other small developers. For more info see my " Promoting Delphi developers & applications? " blog post. So what is it? Deleaker is memory leak detecto

Promoting Delphi developers & applications?

The other day I was approached by a developer to ask if I would feature his application on my blog. I'd not done this before but, after some thought, I decided I would. If I can help promote the Delphi community in my own small way then why not? The upshot is I'm publishing a blog post about Deleaker , a memory leak tracker and profiler, in the next couple of days. So I thought "why not offer to do this again for other developers?" Open source or commercial, I don't mind. Applications or libraries, either is fine. But it's got to be either written in Delphi or useful to Delphi developers. A profile of Delphi developers would also be considered. I'd prefer to help publicise small teams and single handed developers who don't have large advertising budgets, but that's not an absolute rule. And no, I don't want paying! Not unless you're Microsoft et al. Then large wheelbarrows of £50 notes would be more than acceptable. I'm thinking of two

New search facility on the Delphi Tips micro-site

Ever since the old closed last year and moved to its new home on Creo Hosting (thanks guys), the Delphi Tips part of the site never got properly re-established. Instead it got parked on GitHub Pages as . One of the things that was lost in moving from a PHP driven site to Jekyll was the custom search. I've no made partial amends  by putting a Google powered search bar on each page. Of course you do get the usual advertising crap, but the results below the adverts seem to be returning some useful information from the micro-site. Still no new tips though! Anyone who wants to contribute please create an issue on the delphidabbler/delphi-tips project and upload your tip. I'll work through it and covert it to the appropriate format. One day I might enable Markdown formatted tips to be posted, but don't hold your breath"

Released v1.3.0 of my HTML Resource Compiler

Well, this one's pretty niche! And it's getting nich-er-er-er by the day as Internet Explorer dies a slow death. Why's that? Well, HTMLRes compiles individual files files into a single 32 bit resource file, with the contents of each file being recorded in a separate RT_HTML resource. The resources have the same name as the files. These resources have two uses: Internet Explorer can display RT_HTML resources compiled into a DLL using the res:// protocol. This article explains . The IE based TWebBrowser can do the same. Therefore any program that uses TWebBrowser  can embed the HTML & images it displays in the program's resources. This means you don't have to distribute such files with the program and read them from the file system.  The same article explains . Big deal - why not use BRCC32 to compile them then? Well, my  CodeSnip program uses the approach in point 2 above in parts of its UI, and I include some HTML and image files in RT_HTML resources whe

Added unit tests and demo code to Code Snippets Database

I've just released v2.0.1 of the DelphiDabbler Code Snippets Database . This release adds some unit tests and demo code for some of the snippets. The code was previously available, but really well hidden on my Google Drive. Now you can get the code from the main Code Snippets repository. Go to the release download page . There are three separate files for download. The tests are in . Notes: There are no new or updated snippets in this release - it's simply the tests and demos that have been added. The new tests have only been tested with old versions of Delphi. I'll be updating them over time. But if you want to do that, then I won't object! New tests and bug fixes are always welcome - you can now submit them via the project GitHub repo . Just fork the repo, switch to the develop  branch, create a feature branch off develop , make your changes and then open a pull request.

DelphiCon 2021 announced

This year’s official online Delphi conference on all things Delphi has been announced. It's free, and its scheduled for 16th to 18th November. For a change I've decided not to be a last minute Larry and just booked myself in! You can book now at . Keep checking back there as details of speakers etc. are announced.

How to find all Delphi / RAD Studio installations from code - new article

I've just published a new article on my website for the first time in a long, long, long ... time. It takes a look at how you can programmatically detect which versions of Delphi (or RAD Studio) you have installed (locally) on your system. It goes on to show how to find the installation folders and how to find various exe files: I focus on the 32 and 64 bit command line compilers. It's a short step from there to compiling Delphi (and C++?) code from within your program, like my CodeSnip program actually does. I've not gone in to how to do this in my article, but I will if there's interest. Here's the result of running some of the code from the article on my home machine, showing what I've got installed: Compiled with Delphi 11 Alexandria

The System Information Unit Now Detects Windows 11

Probably the quickest I've ever added support for detecting a new version of Windows to the System Information Unit. But that's because most of the work was done last month and I just needed the build number to be finalised. It's a long time since MSs versioning made any sense at all. This time it's even stranger. Windows 11 is version 10.0 You know like Windows 10 is version 10.0! Well that makes sense. The only difference is in the build numbers - Win 10 goes as far as build 19044 so far. Windows 11 pre-releases start at 21996. Even stranger is that the Win 11 release hasn't even got its own build number - it's revision 1094 of build 22000 as far as I can see from reading MS documentation. Does that give an indication of how much of an update MS think Windows 11 actually is? More info about the System Information Unit on my website . Download the new version 5.7.0 from SourceForge .

SSL Errors on Everything's Cool(ish)

The Chrome browser on my Android tablet reported a problem with the security certificate on this morning (2021/10/04 06:50 GMT). Neither my Android phone nor my PC reported such errors a little later. Neither did my tablet when I tried Firefox. Anyhow I've checked with to check and the certificate was OK at 07:57 GMT (12:57 PST).  was fine too. Anyhow - if you're getting the same error be assured everything seems to be now cool! If in doubt use instead - or even the mirror on UPDATE 1: Just (09:23 GMT) received a similar error while using Subversion to commit a change to SourceForge. Like my site, the problematic certificate was issued by Lets Encrypt! . Could there be a problem with that service? Service status shows normal & the last reported problem was high demand on 1 October, b

Swap two integers without using a temporary variable

Here's a clever little algorithm you can use to swap two integers without using a temporary variable. I rediscovered this tip , by Muhammad Saied, while reviewing my Delphi Tips micro-site . Dunno why, but I find this strangley pleasing! Assume we have two integers, A & B, both of which have values assigned. Swap their values like this:     A := A + B;     B := A - B;     A := A - B; To follow this through, let: A0 and B0 be the original values of A and B respectively A1 be the value of A after line 1 B2 be the value of B after line 2 A3 be the value of A after line 3 We have: After line 1:     A1 = A0 + B0 After line 2:     B2 = A1 - B0        = A0 + B0 - B0        = A0 After line 3:     A3 = A1 - B2        = A0 + B0 - B2        = A0 + B0 - A0        = B0 Et voilà. Very cunning Muhammad! EDIT: As  Dalija Prasnikar pointed out in the comments, because you're adding values, there's a danger of overflow errors. So what d'you reckon? Would you use that trick? For me,

Unit2NS gets a hotfix

My little program to look up fully specified unit names given a base name has a memory leak in v0.1.0-beta. For details of the program, see this post or visit the Unit2NS web page web page. This HotFix fixes it. It's been released as v0.1.1-beta and is available in 32bit and 64bit versions from the Unit2NS Releases page on GitHub. O yeah, and this is the first thing I've edited and compiled with Delphi 11 Alexandria !

Updated my little file modification date comparison program

While reviewing my old programs, I've found one that I've not archived but actually updated! It's only a minor update - the program now spits out a friendlier message when no files names are provided. Oh, and the dox were updated and markdownified. Get new release v2.1.0 View the source See the change log

End of the line for two of my programs

I've been reviewing my too-big-to-handle collection of repositories on GitHub. Something had to give and I've picked two for culling just now. More to follow probably. Photo: Chris McKenna  ( Thryduulf )  CC BY-SA 4.0  license. One is the Clipboard Format Spy - a clipboard view that uses some pretty old API calls. It's not had a release since 2014, so I reckon it's time to call it a day. The other is Version Information Spy - a version information viewer / extractor program and explorer extension. I had a thing about version information resources back in the noughties and wrote quite a bit of code. Last month the program celebrated 10 years since its last release, so its pretty moribund - time to say goodbye. There's still some other version info stuff that I may or may not keep.

Delphi 11 Treeview has check boxes

Just been reading one of Marco Cantu's blog posts and am inordinately excited to find the VCL tree view component now supports multi-state check boxes in Delphi 11 Alexandria. I've been waiting a while for this feature. Check out Marco's blog for details. Image from Marco's blog I know, if this makes me excited, I probably need to get a life!

Released v2.1.0 of the PasHi Pascal Syntax Highlighter

Five years to the day from the release of PasHi v2.0.0 I've just released v2.1.0. And, no, I didn't plan it that way. More like I forgot about the program for half a decade until I needed it again! PasHi is a command line Pascal syntax highlighter and it's accompanied by a separate GUI front end program. The mode I use it in most of the time is to highlight code placed on the clipboard and write the result back to the clipboard. I mainly write HTML code fragments that can be pasted into an HTML4, 5 or XHTML documents. Occasionally I use it to write complete HTML files. The project is on GitHub as delphidabbler/pashi and the program installer for the latest release is also on GitHub as Release 2.1.0 . More info from my website .

Opening a command line terminal from Windows Explorer

I'm sure that I'm not the only one who gets irritated when opening a terminal window from the Windows start menu that the first thing I have to do is cd out of my user directory into wherever I want to be. On my old Win 7 machine I had an Explorer extension that let me open a command line in the selected directory. I don't have that on my current Win 10 machine. Neither do I want to do some registry editing nonsense to enable it. So imagine the joy when I discovered this hack yesterday: In Windows Explorer select the folder where you want to open a command line terminal window. Select the folder in the left hand pane. Type cmd in the address bar. Press enter, and voila! Wow ... wish I'd known that a few years ago. Now, if I'm the only one in the world who doesn't know this already apologies for wasting your time! And yes, I'm still using cmd.exe , and no, I don't use PowerShell. And yes, I'm an old fart resisting change. But I&

Arrgh! Silly error ends in another little System Information Unit update

When I published v5.6.1 of the System Information Unit a couple of days back, I failed to catch another strange error in v5.6.0. As a result I've pushed out another bug fix today: v5.6.2. What error? Well it's a weird one - somehow I introduced a different version of the dash character into the some of the comments in PJSysInfo.pas - I think I copied and pasted the comments from a website. I fixed it by replacing the dashes with ASCII "-" characters. Who cares? Anyone using an old pre-Unicode version of Delphi should care, because it's entirely possible that the compiler will choke on such a character. I haven't tested it because I don't have such a beast. But better safe than sorry - this would be a pig of a bug to catch a few months down the line. I only noticed it because SourceTree's diff viewer couldn't display the characters. Well that's an hour I won't get back! Get the update from SourceForge .

New System Information Unit release supports latest Win OSs

Yesterday (2021-09-12) I released a couple of updates to the System Information Unit - v5.6.0 and v5.6.1. v5.6.0 adds support for detecting new Windows versions announced since the previous release last October 31st. Specifically: Windows 10 Version 21H1 Windows 10 Version 21H2 (due late 2021) DEV, Insider preview and beta releases of Windows 11 Windows 2018 Server Versions 2004 and 20H2 Windows 2022 Server Version 21H2 A new method was added to get an OSs revision number from the registry. This is TPJOSInfo.RevisionNumber . There were a few other minor changes. Take a look at the change log for more information. v5.6.1 followed a few hours later and simply marked a few more class methods as inline . This release also added details of v5.6.0 to the change log that got missed in the previous release and tweaked some other docs. v5.6.1 can be downloaded from SourceForge .

New v4.18.0 of CodeSnip has Delphi 11 Support

I've just released a new version of CodeSnip  that adds support for detecting and automatically compiling snippets using the new Delphi 11 Alexandria compiler. For more info see my post on the CodeSnip blog .

Some Features of the Upcoming Delphi 11 (probably)

Before we start, please note that I'm discussing, by special permission, a pre-release product that is subject to change. (Image used by permission) So here's a brief list of what we can (hopefully) expect in Delphi/C++ Builder/RAD Studio 11: High DPI support in the IDE. Design time previews of VCL styles. An improved rich edit control in the VCL - I'm looking forward to that one! Native ARM compilation for Delphi on Macs. An Edge Chromium powered web browser control for FMX. If you want to know more then you can register for a sneak preview event  on 9th September.