Thursday, October 06, 2022

Adding Extensions to Clarion

SoftVelocity Clarion

Clarion includes some useful templates and extensions, and there are many others, both free and commercial, that you can add. Let's consider some of these. First, go to, and from the "other" menu, select "Utilities" to download the ClarionLive Utility Pack. Next, visit and buy the CapeSoft ABC Defaults accessory. You will receive a decryption keyword for the download. You also need to download their free safe reader utility to decrypt the ABC Defaults download. Once you have the ABCDefaultsInstall.exe and ClarionLiveUtilities.exe files, close your Clarion IDE, and run the installers using all the default options.
Open the Clarion IDE and then open your project, e.g. LCLesson. Click on the "Global Extensions" tab.
Click on "Insert" and scroll down until you find the "cwVersion - Version Resource" template. Select it.
Fill in the fields as required, and go to the "Product Version" tab.
Again, fill in the fields as required, and go to the next tab.
These are my suggested options. Click "OK".
Click on the "Generate and Make Current Application" button. Assuming it compiled without incident, open the folder that contains the LCLesson.exe file and right-click to view the file properties.
As you can see, the file has professional version and product information, which was not present before.

ABC Defaults

Let's return to the Clarion IDE and search for another template to use. Click on "Insert" and type "defaults" to the search bar.
Select the "ActivateABCDefaults" template.
Click "OK" The documentation explains what this template does. Basically, it stops certain misbehaviour by your application when some error conditions arise.

Ultimate Debug

Before we use this template, please download DebugView++ and install it. It is an extremely useful debugging tool for Windows. There are others, so if you are happier with a different one, that's also OK.
Click "Insert" and search for "debug". Click on "UltimateDebugGlobal" and click "Select".
The default settings in the template are fine for now. You may want to tweak them later, but I haven't found a reason to do so yet. Click "OK".
Build the solution as normal, and wait for the app to run. Then fire up your debugger program (DebugView++)
The template has inserted debug trace information into your program. As you open and close screens, the debugging information will display in the debug window. This is helpful in figuring out what your program is doing. In the next lesson we will add in some of our own debugging code.

One More Thing ...

I discovered a bug in the Ultimate Version Resource template while writing this lesson. So how do we disable or remove a template or extension? First, close the application you are busy with, and return to the IDE Start Page. Next, go to the "Tools" menu and select "Edit Template Registry".
Wait for the list to load. Then click on the "Contract All Nodes" button.
Scroll down to find "Class UltimateVersion", select it and click the "Disable" button. Click on the green "Save and Exit" button. The "Ultimate Version Resource" is no longer shown when you try to insert an extension.

No comments: