Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

If you haven't already done so, either download the CML or (preferably) clone the repository using GitHub for Windows.

You'll now have a directory tree that looks something like this:

...

You won't see the .git directory unless you have Windows Explorer configured to show hidden files/folders. 

...

I favor the latter approach because it means that Clarion is always using the latest CML files. The downside is I need to modify the redirection file.

There are four lines that have to be modified in the Clarion80Clarionx0.red file (which you can find in Clarion's bin directory). Here are is what the changes look like in my RED.

Panel

[Common]
*.chm = %BIN%;%ROOT%\Accessory\bin
*.tp? = %ROOT%\template\win; F:\Clarion\ClarionMagLibrary\template
*.trf = %ROOT%\template\win
*.txs = %ROOT%\template\win
*.stt = %ROOT%\template\win
*.* = .; %ROOT%\libsrc\win; %ROOT%\images; %ROOT%\template\win; F:\Clarion\ClarionMagLibrary\libsrc
*.lib = %ROOT%\lib; F:\Clarion\ClarionMagLibrary\lib
*.obj = %ROOT%\lib
*.res = %ROOT%\lib
*.hlp = %BIN%;%ROOT%\Accessory\bin
*.dll = %BIN%;%ROOT%\Accessory\bin; F:\Clarion\ClarionMagLibrary\bin
*.exe = %BIN%;%ROOT%\Accessory\bin; F:\Clarion\ClarionMagLibrary\bin
*.tp? = %ROOT%\Accessory\template\win
*.txs = %ROOT%\Accessory\template\win
*.stt = %ROOT%\Accessory\template\win
*.lib = %ROOT%\Accessory\lib
*.obj = %ROOT%\Accessory\lib
*.res = %ROOT%\Accessory\lib
*.dll = %ROOT%\Accessory\bin
*.* = %ROOT%\Accessory\images; %ROOT%\Accessory\resources; %ROOT%\Accessory\libsrc\win; %ROOT%\Accessory\template\win

I know, I should probably write a utility to update the RED. 

Using the library

At present the CML is more of a hand coder's library, but if you're strictly an AppGen developer it's not that hard to take advantage of CML functionality. And yes, just like the RED utility, a comprehensive template to make it easier to use CML features is on my ToDo list. 

There are two ways to use the classes; you can compile the source code, or you can use use the precompiled DLL. 

...

_Compile_CML_Class_Source_=>1

Your builds will take a little longer this way, which isn't a big hassle especially if you have just one APP that uses CML. It's more of a problem if you're using CML with multiple apps. If there are any changes to CML code you need to compile each and every one of those apps. Unless you really want to compile the source I suggest using CML in its default configuration.