Category Archives: Clarion Win32

Clarion 10 update (May 2017)

Today we released another update for C10. This update fixes some subtle ODBC/SQL driver issues that were reported to us, as well as a number of other issues.  The ODBC driver bugs we fixed required some very specific combinations/conditions, check the readme file for the details.

The H5 technology also continues to improve, you’ll find a number of fixes and new features, as well as performance improvements. We’ve also updated the App Broker to use a more recent version of OpenSSL that offers better stability and security.

If you want to deliver your app to mobile/tablet devices, jump in and take H5 for a test ride, it takes only minutes to see the possibilities. It also works great on the desktop while at the same time completely changing the UIX of your app, and opening up your app to the ever expanding world of Javascript libraries.

Read about all the changes here

Some highlights for the C10 release

These are highlights of new features in 10.0, for the complete list of fixes, changes and enhancements please refer to the readme text file as its always up to date with all of the latest new features, changes and fixes. All of this information is in the main Help file under the “What’s New in this Version” topic with links to the related topic content.

Big performance boost – in most cases your build time will be cut in half (or better).

  • New scanner for the Clarion (CLW) compiler
  • Support of nested OMIT/COMPILE blocks. Every source/include file
    can have nested OMIT/COMPILE blocks with a maximum nesting equal to 8 with a condition that when evaluated does not omit source, plus one additional OMIT/COMPILE with condition evaluated to omit source code.
  • The compiiler’s scanner uses the OS settings to determine the type of characters to expect. That allows for local national language alphanumerics to be used in identifiers (LABEL).

Dictionary Global Search and Replace
Powerful global Search and Replace for all the settings/attributes of FILEs, FIELDs.and KEYs.

TCP Networking – Client/Server communications
Drop-in a template to put network communications into your applications (using TCP/IP over a LAN/WAN or the Internet). You can pass messages (or files) between applications running on the same computer, and from one computer to another. You can also broadcast messages to all connected computers or processes. The templates and underlying QuickAppConnect class handles all the difficulties associated with socket programming.

The associated Code templates listed below provide support for the following
Socket “Actions” without writing any code:

  • Connect to Server
  • Disconnect from Server
  • Start Server
  • Stop Server
  • Initialize IP and Name
  • Send Message
  • Send Notification
  • Broadcast Notification (broadcasts a message to all connected apps)
  • Broadcast Shutdown (tells all connected apps to shutdown)

Language extensions – templates for Sending Emails, Emailing Reports, and Sending SMS (Text) messages
The new implementation for emails supersedes the prior implementation, and provides many more features, and is far easier to use. Based on the latest support implemented in the Microsoft .Net Framework.
(The original email implementation continues to ship for backward compatibility.)

Use HTTP or HTTPS to download web pages, or any other type of file. You can also post form data to web servers. Very easy way to send HTTP web requests (and receive responses) to Web Servers, REST Web Services, or standard Web Services, with the most commonly used HTTP verbs; POST, GET, PUT, and DELETE.


Amazon Simple Storage Service (Amazon S3)
Easily provide secure cloud server access in your App using the Amazon Simple Storage Service (Amazon S3).  Use it for backing up data, sharing files amongst remote clients, news feeds, etc.

JSON Support

JSON (JavaScript Object Notation) is a lightweight data-interchange format. It is easy for humans to read and write, and easy for computer languages to parse and generate. JSON is an easier to use alternative to XML. JSON can be fetched or uploaded with an HttpWebRequest.

Image manipulation functions;
ImageToPNG, ImageRotateFlip, ImageSaveThumbnail

Background Threads

The WorkingThreadManager class allows you to run a PROCEDURE on a background thread without any UI, and receive events on its status. The implementation is by a template and the class design is thread-safe.

Exception log viewer

The exception log viewer will read the map files created when you built your project and use these to turn the stack trace in the exception log into a list of procedures so that you can quickly and easily find the point of failure.

Project System

Support for the – #file copy srcfile dstfile – command.  If the command is included via the PRAGMA command in a source file, the copy occurs directly after the compilation of the source file.  If the source file does not need recompiling, the copy occurs directly after the source file would have been compiled.

The project language supports the – #file copy srcfile – command.  This comand copies the srcfile to the destination directory for the current project.  The copy only occurs if the build is successful.  The copy occurs after the destination binary (the exe, dll or lib) has been built.

Application Options

Now you can choose to have the %FILE Template symbol return files in the same order that they are displayed in the dictionary editor.  This means that some lists of files inside the application generator will appear the same as the dictionary editor.  However, take note, the File sort order also affects the order of code generation, so that files will be generated in a different order to what they were previously. To turn this feature on you need to go to Tools/Application Options/Generation tab and check the “Sort %FILE the same as the Dictionary editor” check box. Note: If you use LIKE in your file structures the changed order of generated FILEs could possibly cause compiler errors.

Lock Retries
You can now set how many times generator tries to gain access to a file in the Application Options window. This option can be useful in situations where automatic backups are running and briefly locking files.

Template Registry
The Application Generator now supports product version identifiers in the naming convention for the TemplateRegistry.trf file.  For example, Clarion 10 by default uses the name TemplateRegistry10.trf.
If the Application Generator does not find a registry .trf file with the version appended name, it then looks for TemplateRegistry.trf (without the version identifier).  By default when a new .trf is created it is created using the version number as part of the file name.

Dictionary Editor

  • The Dictionary Editor now remembers dialog sizes and positions
  • The Dictionary Editor now stops you from adding GROUP fields to keys of SQL tables
  • The Dictionary Editor now stops you from adding dimensioned fields to a KEY

Now you can trace the location of a file and the folders search order used by the Redirection system from ClarionCL using the /rt switch.

MSSQL Driver
Now you can get the MSSQL driver to use SCOPE_IDENTITY to retrieve server identity values by adding /AUTOINCUSESSCOPEIDENTITY=TRUE in the driver string

SQL Drivers (all)
The SQL drivers now set FILEERROR() and FILEERRORCODE() to give more details when you try to define a KEY who’s component is a GROUP

When you select “Open Containing Folder” from the context menu of the tab for a document in the IDE it now highlights the file in the opened folder

Open File Dialogs
New option to use the Redirection System File Open Dialog as the default.

Text Editor
Find All in the text editor now runs in the background allowing you to do other things while the search is continuing.

Clarion 9.1 update is out today

An update to 9.1 is being released today, here are a few of the more important fixes;
FIX: OLE Automation could be treated as side-by-side instead of an OLE server in a separate process

This fixes OLE server automation, such as automating MS Office components, and came about as a result of the support added for registration-free COM.  Surprisingly even after months of beta testing this wasn’t found until after the 9.1 gold release.

And these two, related to problems with either unusually large amounts of Procedure data, or .APPs where templates have been unregistered without removing the associated embed code:

FIX: Possible IDE lockup when there is very large number (hundreds) of local/global variables/tables in the Procedure and the IDE is processing the closing of an embed.
FIX: Possible failure on closing APP if embed tree with orphan embeds has been touched.

There are many other fixes and changes, you can see the full list here.

And of note for those using SQL backends;
FEATURE: The Clarion to SQL converter now converts the following operators for the specific drivers –
% (Modulo) All drivers
^ (Power) Pervasive SQL, Oracle
& (Concatenate) All drivers. *Note that ODBC uses the ANSI standard ||
XOR (Exclusive OR) SQLAnywhere, MSSQL

Clarion 9.1 Gold release

After a long and very thorough test cycle involving  thousands of users, Clarion 9.1 Gold is released today!   From the implementation of support for the Win8 API for accepting Touch input, to the new support for Registration-Free COM, and the new i64 family of functions, this is a very important release. All told there were almost 350 public fixes/changes/features implemented.

The release today includes additional changes/fixes and enhancements since the last beta release. View the complete list here.

To learn more about 9.1 you can read some of these older posts:


9.1 – beta 6 released

The 6th beta is out today (March 27). There are ~50 fix/changes/new features added to this release. We expect that next week we’ll make a final pre-release available to all users. You can view the complete list here.
Some of the new features in this release –

  • New WindowManager method ModalEvent added that can be used to test if the current event is modal or not
  • The ODBC driver now supports generating JOIN structures where the the column names in the ON clause of the outer join are in the same order as their respective table names in the OUTER JOIN clause
  • The ODBC interface to TPS now supports LEFT OUTER JOIN clauses on the left hand as well as the right hand side of a join. If a join is on the left hand side, then it must be enclosed in brackets
  • a new XMLWriter class to easily write new XML files

9.1 – beta 5 is out

Yesterday (March 13) we released an updated beta version.  We are getting close to a general release and we’ll know better after the beta testers have had a few days to work with this release.

On the topic of conversions between LONG and TIME data types we introduced two new Pragmas. You can control how the conversions between a TIME field and a LONG are handled using these PRAGMA settings:

PRAGMA (‘define(time0=>off)’) or PRAGMA (‘define(time0=>on)’)

PRAGMA (‘define(sqltime0=>off)’) or PRAGMA (‘define(sqltime0=>on)’)

Summary of behavior when these pragmas are set on/off:

PRAGMA (‘define(time0=>off)’)

This is the default value. TIME(0) is converted to 1 (TIME:MIDNIGHT), i.e. mid-night to mid-night.

PRAGMA (‘define(time0=>on)’)

The compiler generates code to convert TIME(0) to 0 (TIME:NOTIME).

PRAGMA (‘define(sqltime0=>off)’)

This is the default value. The compiler does nothing additional for fields of SQL tables having the TIME data type.

PRAGMA (‘define(sqltime0=>on)’)

If the TIME value to convert is a field of a FILE, the compiler generates a call to the NULL function. If the result from the NULL() function is TRUE (field has a NULL value), the TIME field is converted to 0 (TIME:NOTIME) value. Otherwise, conversion is controlled by the define(time0) pragma.

It is easiest to set the PRAGMA to the desired value at the Project level (Project Properties) But PRAGMA directives can be set before any line in your code where TIME value is being used in an expression converting TIME to LONG).

Related; All SQL drivers have been updated so that a call to NULL(datefield) or NULL(timefield) will return TRUE if they are part of a DATE/TIME Group, and the corresponding column on the server is NULL.

9.1 – beta 4 is out

We released 9.1 beta 4 last Friday (Feb 14).  The news on the 9.1 release has been focused on Touch support and Registration-free COM support, but there is a LOT more than that in this release.  Check the readme here for the complete list of fixes/changes and new features. We’ve expanded the beta test group to ~100 developers – if you’re a Clarion developer who is interested in working with the beta version, and have the time and patience to work with beta software… we’d be glad to add you the group – send an email to support to request access.

Clarion 9.1

The next Clarion release (9.1) has over a dozen new features, and many bug fixes and changes to improve the RTL and IDE, but two new features stand out above the others.  That is the support of Touch input and  the support for Registration-free activation of COM objects from side-by-side assemblies.

The Touch support is automatic and transparent, no code changes needed — just a rebuild of your app and you have it.  But you also have the option to use an interface to take full control of all the touch events and handle them as you see fit.  We have a few good examples that will show you exactly how to do that.

The Reg-free COM support is also automatic, and likewise requires no change to your code. If the OCX ProgID isn’t found in the OS registry then the RTL looks for a local manifest.  The declaration of the interfaces in the OCX can be placed in either the program’s manifest or in a separate manifest. In the latter case, the program manifest must contain the <dependency>
block with assembly name equal to name of the OCX’s manifest without the “.manifest” extension (this the preferable way).

Tomorrow we’ll be expanding the group of Clarion 9.1 alpha testers, and our goal is to get 9.1 to all 3rd party vendors by the end of the week.  If all goes well within another ~week it’ll move to a general release.



H5 Builder

At CIDC in September we showed a quick demo of an H5 enabled app.  For the details on what the H5 product is all about you can read this;

At the conference I talked about our plans for H5:

H5 will be included with a future C9.x EE.  H5 will be our first Clarion Community open source project.  We’ll be posting the templates and classes onto GitHub so that Clarion developers from around the world can hack, enhance, branch, and generally share their ideas and expertise (working along side our core dev team).  At the conference quite a few of the Clarion devs present indicated they are looking forward to getting involved with the project, and I think there are many more who weren’t at the conference who will join in.

Currently we are refactoring the templates/classes to move each control into separate file(s).  This is a necessary first step to ensure its easy to work on files and get them checked back into the common repository while minimizing conflicting changes.  We expect to open the project on GitHub in approximately 2 weeks.