Clarion Handy Tools
Templates, Classes, Utilities, Apps, Projects

May 2019

May 31, 2019
Build 23B.01.09 Released

CHT SNAP EDIT -- Version 23B.06.2019
XML2HTML™ Editor Enhancements

• Version 23B.06.2019 has been reworked to provide two different preview methods:

F5 = Generate and Preview as HTML with CHT Previewer

F5 loads the HTML for preview into HNDPREVIEWER.EXE as before.

F6 = Generate and Preview as HTML with your Browser

F6 loads the HTML for preview into your DEFAULT PC Browser.

• Version 23B.06.2019 other enhancements added:

Editor Window Size and Position

The editor window now re-opens in the size last closed, and at the X,Y position last closed.

HTML, CSS, XML, Javascript, COLOR, CHARACTER Help Menu

The editor "Help" menu now provides web-links to useful help pages with information to HTML, CSS, XML, Javascript, COLOR, and CHARACTER help.

May 22, 2019
Build 23B.01.08 Released

XML2HTML™ Parser Enhancements

We've further reworked template Embed Standard Web Page Header Short (WPHS) which is used for XML2HTML™ preview by CHTSNAPEDIT.EXE and XML2HTML™ processing in TYPE 2 and TYPE 4 Servers.

The XML2HTML™ parser will now remove code comments from XML before generating to HTML.

For example: /* THIS IS A CODE COMMENT */

Only text and/or code inside tagged embed points is processed. Any notes, text, or even HTML code that you place, or we've placed, outside of our standard, tagged embed points is ignored and not generated into the finished HTML.

Note, also, that /* */ - with one space between the asterisks - indicates to the parser to insert one CRLF into the HTML file at that point.

Now page language, too, may optionally be defined in an XML section as follows: <PageLanguage>en-US</PageLanguage>

If the <PageLanguage> tag set is missing or empty, page language follows the setting in the CHT template Embed Standard Web Page Header Short. In other words, page language, is supplied by the XML2HTML™ interpreter procedure as configured on our Clarion template.

The parser also now permits optional extra page META DATA lines to be defined in an XML section. And if the <PageMetaData> tag set is missing or empty, the standard meta data applied in the CHT template Embed Standard Web Page Header Short are still there as always.

The parser now also permits optional inclusion of a Javascript section in the head area of your HTML via a <JSIncludeSection> </JSIncludeSection> tag set in the XML template file.

Our own preference, these days, is to not use Javascript in our HTML pages but the possibility of doing so exists if the developer wants it or needs it.


The HNDTYPE4SERVERPEOPLE.APP "PEOPLE EXAMPLE" application has been reworked to allow browsing and editing of data records from any device, big or small, desktop, tablet or phone.

The server has been modified, first of all, to not directly display a data browse page, as it did before, when accessed via a bare URL like

It presents, initially a home/login page called peoplebrowseindex.html which is server-generated from 000peoplebrowseindex.xml.

This server home page doubles also as a LOGIN page which has embedded into it a temporary login ID# or PIN# generated by the server, when it receives a HOME page request. That PIN# must be logged-in before server data becomes viewable and editable.

This PIN# technique allows the server to service multiple connections all browsing and editing without the resulting data requests clashing.

One PIN# client can be browsing in name order while another PIN# client edits a record while yet another PIN# client browses records in zip order, and so on for hundreds of multiple connections. All of this, of course, happens from only one instance of the server, not multiple instances required by ALL OTHER CLARION-BASED web-client technologies of this type.

This server example uses 5 (five) different XML template files to act as the basis for 5 different HTML pages which are generated into the server root from the original XML template files.

The source XML template files are not modified, since temporary copies of the XML template files are embedded with data by the server and then "generated" into temporary HTML files by a server procedure based on our template Embed Standard Web Page Header Short mentioned above.

All temporary files, whether XML or HTML, are tracked by the server and deleted when the server is closed to reduce file clutter. All generated files can optionally be given a "half-life" on creation such that the server deletes them after a server-configured time has elapsed. Hence a server that continues running for days, weeks or months does not retain in it's root/run directory more than recently generated XML and HTML files.

See ServerMain() for a required XML files list used by this example server. The server has been abstracted to copy the required XML files into it's configured root directory from our CHT installation's XML directory. So that CHT Developers will be able to run the server directly from CXX\HNDAPPS\ or from \YOUROWNROOT\ as desired as long as the CHT installation is present on the host machine.

Testing and running on a non-CHT-Installed machine is also possible by changing the CHT.CopyXML() function in ServerMain to point to a directory where the source XML template files will be pre-placed by the developer.

All XML template files have commentary in them to help developers understand how they work. The embed points inside these template files are commented along with references to server procedures and procedure line numbers where the server is embedding something into the XML file before it is generated into HTML.

Please feel free to experiment with this server and to ask questions on our subscriber forum if you can't follow what's going on.

Try Our Example Data Server

Browse the sample "people" data. Edit records and review your edits, from any browser. Try it with your phone! (Sample data is fictitious, so no harm done if you change some records.)

May 12, 2019

Build 23B.01.07 Released

HNDTYPE4SERVERPEOPLE.APP has been advanced to illustrate how to use a landing or home page when the server is reached via a bare URL without the UCR$ parameter.

The HOME page displays a PIN entry form that lets the user enter a server-level PIN number that permits or denies entry to the browses from the HOME page.

Server Base Page PIN Entry Form


Before testing, be sure to use the server's Config-> Server Security menu to enter as follows: User Name = "cht-xsa" (exactly) Pass Code # "8-digit PIN".

Server-PIN Configuration Form


This technique, of server-level login, while less secure than user-level login, can still provide a barrier to your data browses by placing a PIN-style login between user and the browses when only the bare server URL is accessed.

Two example static pages have been added to act as a server home page (000peoplebrowseindex.xml) and a server login fail page (000peoplebrowsefail.xml). Read the instuctions provided in these page templates and generate them into your server root before testing.

These are STATIC pages, not DATA PAGES so they do not need to be regenerated automatically by the server each time they're accessed. You MUST initially generate them into the server root yourself and then regenerate them only when YOU MAKE CHANGES to these two source XML page template.

Note that the server's BrowserServerInitialization template's "CFG" tab settings have been changed in the "Force Base Page" dialog. In this design, when the server is accessed via just a bare URL, like, the server now goes to the home page serverpeopleindex.html not to a data browse.

Server Base Page Template Dialog


Generated Base Page Code


In procedure ServerMain() at approx Line 10952 the server looks for a Param value of "cht-xsa". If found, it then looks for Param2 (the PIN) which it compares to the PIN value established in the registry. If the same PIN is found configured there, only then are the PEOPLE browse menus presented, otherwise the server presents the OOPs page based in CHT-XML template "000peoplebrowsefail.xml".

Server Code To Intercept PIN


The login FORM we've exampled for you in CHT-XML template "000browsepeopleindex.xml", uses a submission setting of "GET" which passes to the server a command line as follows: UCR$&PEOPLEBROWSE.UCR&Param=cht-xsa&?Param2="yourpin#".

This simple type of login (i.e. server level) does not identify the user, so we won't really let users edit the data yet (though we could), because we can't control who edits browse data to a specific user, only to users who've been given the server PIN.

In a later design variation of this server, we'll illustrate user-level login.

Before then, though, we intend to abstract browse table creation and make it less hand-embed dependent than today's variant of HNDTYPE4SERVERPEOPLE.APP.

CHT developers: You'll need to follow along, as we advance this, to really ever make it past the CHT server-hobbyist level. If you've even read to here in this document, we'd appreciate some feedback, good, bad or indifferent.

LBX Template

ListBoxBrowseExtender (LBX) template tab dialogs that result in changes to the LIST() control on your window, (tabs are: FIELDS, ICONS, COLORS and PROPERTIES) now provide a reminder to visit the FORMAT tab after changes, and to check the "Generate LIST() Control Format String" switch. If you don't yet understand what this does or how to use it, a "HELP" dialog button walks you through the steps.

Some advances were made in HNDFLBRW.INC/HNDFLBRW.CLW to the class called HNDFileLoadBrowse which is the basis for ListBoxBrowseExtender template browses.

The method called FillFromSQLSelect() can now handle Browse Queue and Table Record differences which result from ICON and COLOR fields in the queue such as one would encounter in ListBoxBrowseExtender (LBX) and HandyMarkerBrowse if the queue was assigned one or more ICONS from the template (dynamic icons or static icons).

LBX will now make the correct ICON field declarations {PROP:IconList} and ICON field assignments directly from the template even if FillFromSQLSelect is used by LBX instead of say, FillFromView() or FillFromFile().

To see this in action look at application HNDLBXSQL.APP which has dynamic icons on two columns as per the new dynamic icons feature on LBX. The browse on this app's only browse procedure ListBoxBrowseExtenderProcedure() presents four different browse-fill buttons, each of which uses a different LBX method for filling the browse. These are: FillFromFile(), FillFromView(), FillByEmbedding(), and FillFromSQLSelect(). The FillFromSQLSelect() method now can correctly assign icons and/or dynamic icons and data fields, despite the queue having ICON fields which are, obviously, not in the data table. Before this revision the method FillFromSQLSelect() was not able to handle icons and color fields.


Some corrections were made to HNDTILEAPPLAUNCHER.APP to ensure that this runs correctly from the \hndapps\ directory on any machine where CHT+C10 or CHT+C11 are installed.

Components required by HNDTILEAPPLAUNCHER.APP are listed in template dialog AACHTControlPanel->Config->Application Version Information.

These dependencies are as follows:
\accessory\hnd\xml\000example.xml (example 1)
\accessory\hnd\xml\000examplegrid.xml (example 2)
\accessory\hnd\xml\000examplehelp.xml (example 3)
\accessory\hnd\xml\000goodwords.xml (example 4)
\accessory\hnd\xml\000examplebrowse.xml (example 5)
\accessory\hnd\xml\000templatesbrowse.xml (example 6)

\hndapps\hndtileapplauncher.html (generated if missing)

\accessory\bin\chtsnapedit.exe (XML editor with preview menu)
\accessory\bin\hndpreviewer.exe (preview generated HTML)
\accessory\bin\hndxml2htmlgen.exe (generates HTML from XML)

This example illustrates an HTML-based MAIN procedure from which other applications, and/or application procedures can be started.

The browser control on the MAIN window, launches "hndtileapplaunchermenus.html" automatically for purposes of demonstration but changing the HTML file being displayed by this application is trivial. This file is assumed to be in your application directory and if missing it is regenerated by HNDXML2HTMLGEN.EXE from an XML template we've provided called "000hndtileapplauncher.xml".

The finished HTML file is copied by the XML template to the name hndtileapplaunchermenus.html for the purposes of this example. Finished HTML names of generated entities is totally under developer control.

This application, illustrates six other .XML templates by opening them into CHTSNAPEDIT.EXE and suggesting you preview the XML file as HTML by pressing the F5 key in the editor after first clicking anywhere in the editor work surface.

May 7, 2019

Build 23B.01.06 Released

HNDUTIL ( function called UTFLatin1ToHTML() has been revised slightly to a loop-within-loop style, as the previous release of this was only changing the first instance of any of the extended characters in UTF-8 C1 Controls and Latin1 Supplement CHR(128) to CHR(255) This version now will subsitute all found instances of the extended character.

FWIW this can be made to also work with the following sets:
UTF-8 Latin Extended A - Range: Decimal 256-383
UTF-8 Latin Extended B - Range: Decimal 384-591
UTF-8 Greek and Coptic - Range: Decimal 880-1023
UTF-8 Cyrillic - Range: Decimal 1024-1279
UTF-8 Cyrillic Supplement - Range: Decimal 1280-1327

However, higher than 255 characters won't work with Clarion 10 as it's simple, CHR() function can only handle extended characters 128 to 255.

Higher value extended characters CAN be made to work with Clarion 11 as it proposes a CHR(xx,1) function (though not implemented currently by C11) that allows us to handle the higher character numbers to 1327 in order to handle Latin B, Coptic, Greek and Cyrillic substitutions.

Softvelocity, the ball is in your court on this one!

Speaking from our perspective, we won't wait forever on this, as we have the option of implementing a subsitution system in C#.


Other changes -- CHT release number 23B.01.06

Attn: Paul Konyk, since you asked for this some months back.

ListBoxBrowseExtender now has implemented conditional icons which can change browse column icons based on browse conditions stipulated by the developer on our template.

For an example, see HNDLBXDM.APP in the two procedures marked "TEST".

The template conditionally displays an "Icons" tab when any of the column-fields in the browse design have been assigned icons.

On this "Icons" tab, it is possible to indicate which of these icon-enabled columns have conditional icons applied at run-time by the template. Multiple, mutually exclusive conditions can be placed on the same column each displaying a unique icon.

May 3, 2019

People Example Browse

The latest version of HNDTYPE4SERVERPEOPLE.APP (example data server) may be viewed and tested here:


CHT Templates List On-Line

The latest version of HNDTYPE4UCRSERVERTEMPLATES.APP may be viewed and tested here:


May 2, 2019

Release 23B.01.05 Notes

Templates under study and modification:
EmbedStandardWebPageHeaderShort (XML2HTML Parsing and HTML Page Construction)

HandyFileViewBuilder (Build HTML tables from File and View Data)

Classes under study and modification: HNDUTIL (

A character conversion function for UTF8 Latin 1 (CHR 128 to CHR 255) was added to HNDUTIL. This converts for example a character like Ç in your data to &#199; so it displays correctly in the browser as Ç.

This is based on reference: Charset Reference and can be expanded to work with Greek, and Portuguese characters also.

The behaviour under study is/was the appearance of extended Latin1 characters visible in your XML (pre-html) file and in your file and table data. When converted into an HTML file by merging file data with XML which is then run through our XML2HTML converting process based on the above two templates, some of the characters did not display correctly in the browser when they were extended characters (for example French characters with accents) but now they display fine.

The templates listed above now provide an auto-conversion call to the character converter function by setting a template switch to the ON position.

We've configured the EmbedStandardWebPageHeaderShort or HandyFileViewBuilder template to autoconvert extended characters in the following applications:

HNDXML2HTMLGEN.APP (called by CHTSNAPEDIT.EXE for HTML preview of XML templates)

HNDTYPE4SERVERPEOPLE.APP (example HTML only data application)

HNDTYPE4UCRSERVERTEMPLATES.APP (serves up a web browse of CHT templates)

HNDVIDEOEDUCATION.APP and HNDVIDEOPLAYER.APP have been redirected to The SERVER and URL they were directed to were put to other purposes some time around mid-March 2019 so these apps have been unable to connect for a few weeks. In this build the newly applied url puts them back into service.

New Demo Application Just Introduced: HNDTYPE4SERVERPEOPLE.APP

This is a Type 4 example page server that publishes the "PEOPLE" table from HNDO.TPS. It publishes just two different pages, a browse listing records from the PEOPLE table, and a READ ONLY form that displays one record (when selected on the browse) from the PEOPLE table. This follows exactly the Clarion browse/form paradigm.

This is a TYPE 4 server, so it is a read-only public-access server. Data displayed is not editable or changeable from the browser.

Page design is such that it will display quite legibly in browsers based on phones, tablets and desktops. Imagine it providing public shopping pages or public lists of all sorts.

This CHT server app is a perfect learning opportunity for Clarion developers wanting to break into HTML web browses and forms that will run on any browser-based device, a phone, a tablet or standard desk-top.

100% of page design is controllable, and previewable from CHTSNAPEDIT.EXE, (+HNDXML2HTMLGEN.EXE +HNDPREVIEWER.EXE) based in the two .XML files mentioned below.

The server's two page designs are based on two XML template files: 000PEOPLEBROWSE.XML and 000PEOPLEFORM.XML located in our installation \accessory\hnd\xml\ directory.

Procedure XML2HTMLPeopleBrowse() generates a browse table into XML embed point provided in 000peoplebrowse.xml.

Procedure XML2HTMLPeopleROForm() generates a read-only data form into embed point provided in 000peopleform.xml.

Required components:
• (The server application)
• (The server dictionary)
• (The server data file)
• (copied to server root on server start)
• (copied to server on server start root)
• (copied to server root on server start)

May 1, 2019

Build 23B.01.03 Released

This build was released late last week, a few days early. The "official" release date of this build is, however, April 2, 2019, as it falls within the first week of the second quarter of 2019.

As always, the letter incorporated into our build number represents the current year quarter:

23A = First Quarter (Jan, Feb, Mar)
23B = Second Quarter (Apr, May, Jun)
23C = Third Quarter (Jul, Aug, Sep)
23D = Fourth Quarter (Oct, Nov, Dec)

See the second section below, for details from our updater notebook to get a more expansive look this build. Of course you will receive those same notes on your desktop, as soon as you complete an update with the latest CHTSETUPC11.EXE or CHTSETUPC10.EXE.

Heads Up: Is Your Updater Obsolete?

We've revised our new CHTSETUPC10.EXE and CHTSETUPC11.EXE updaters a number of times over the last few months. Some of the earlier versions did not always update themselves reliably. We can see from our server log that some CHT developers are using older updater versions that should have self-updated and obviously didn't.

We have instructed our server to return a "CHT Updater Obsolete" message when it encounters one of these older updaters. If, you receive this message please download a new CHT Updater for C10 and/or C11 from these links:



Save the zip into your usual download directory, approve it, if necessary, with your Windows 10 operating system, then please extract the zip contents to: /ACCESSORY/BIN/ below your Clarion installation directory.

The zip contains two files, a Clarion version specific installer-updater and a certificate called CHT_CODE_SIGN_ONE.CER. It is not necessary to re-install this certificate if you've already done so for a previous installer-updater.

To install the certificate, simply right-click the CHT_CODE_SIGN_ONE.CER file after extraction and click "Install Certificate" in the popup menu. Select "Current User", then select "Place all certificates in the following store", click "Browse" and select the second item from the top called: "Trusted Root Certification Authorities", then click through until the dialog completes.

You're A Developer, Right?
So Does Your O/S Know This?

Unless you use exclusively development tools only from the Windows store, you probably have your Windows 10 set to "Developer Mode".

Developer Mode lets you "Install any signed and trusted app and use advanced development features". So says the "For Developers" dialog in Windows 10 settings under "Update & Security".

Clarion developers and consequently users of 3rd party Clarion tools, need to set their systems up in "Developer Mode".



Contact Us

Click the link below to contact us by email.
It will start your email client with our email address inserted:

Click To Contact Us