Yesterday I was messing around in the IDE and noticed the ASCII table in the Toolbox pad and realized it was missing the Extended ASCII characters (ASCII 128-255)  This morning I got an email from ClarionHub, which hosts a repository on Github with some goodies - including an updated ASCII table with updates from Mark Goldberg.  I played around with it and have now added all the Extended characters to the table and committed it back to Github.  I have also made it available for download here on Icetips at http://www.icetips.com/files/ASCIITable.xml

Once you have saved the file, you need to go to the folder where Clarion is installed and then navigate to "data\options\TextLib" and you will find ASCIITable.xml there.  Make a backup copy of it and then copy the file from Icetips over it.  Restart the IDE and you should now get the full extended ASCII table.

There are two more files in the repository on Github, "CW File Access Modes.xml" and "CWErrors.xml"  The first one contains all the values for file access modes and the second one contains a list of run-time errors you may encounter and what they mean - see screenshot below:

Clarion10ToolboxWithCWErrors

 

So, check those files out - they may be helpful to you:)

Arnor Baldvinsson

In the Applications pad there is an option in the generate/build buttons drop down list to "Generate Trace File"  Today I was wondering what this was and my first thought was that this was the template debug trace file.  But on my development virtual machine I couldn't find one even though I had found that this setting was checked.

So I asked on the Clarion 10 newsgroup and Graham Dawson set me straight on this.  This is indeed settings for the template debug trace file.

Clarion10TraceFiles
Trace File Options in the Applications pad in Clarion 10

There are 3 options there:  generate, don't generate and generate by application settings.  If "Generate Trace File" is turned on, it is generated unconditionally.  If "Don't Generate Trace File" is checked, then it's not generated.  If "Generate Trace File - Default (Application Settings)" is on, then it's only generated if it's set in the Application Options.

Clarion10ApplicationOptionsTraceFiles

 

So what is this Trace File?  It is a file that generates all interactions with templates during generation.  It can grow to enormous size!  For example generating an application with browses and update forms, about 100 procedures, produced a file that was 3.5 GB (yes GB as in GIGA Bytes!) after a single generation!

Obviously those huge files are next to useless for template debugging because of their size and that's where the #DEBUG statement comes in.  The trace file generation can be turned on or off by using #DEBUG(1) to turn it on and #DEBUG(0) to turn it off.  But it's not quite that simple as the value must by in a symbol so you have to do something like this:

#DECLARE(%SetDebug)
#SET(%SetDebug,1)
#DEBUG(%SetDebug)
  #! Some template code here
#SET(%SetDebug,0)
#DEBUG(%SetDebug)

This would then generate just the code in between the #DEBUG statements into the trace file.

The default Trace File name in the Application Options is "C:\tpldebug.txt" and if you force the Trace File generation with the generation/build buttons, it is "C:\tpldebug2.txt"  If you change the filename in the Application Options to just be the filename, without the driveletter, i.e. "tpldebug.txt" the file is generated into the folder where the application is that you are generating.

If you feel that the generation is slower than normal, check to make sure this isn't turned on!  Even on a very fast computer generating the trace file to a SSD drive, it still slows down the generation considerably!

Arnor Baldvinsson

I do quite a bit of small hand coded test projects. Usually just a few lines of code to test some code or concept.  One of the things I like to do is add the Icetips Utilities to those projects so I can use methods like ODS (OutputDebugString)

Below I go through the steps and at the bottom is a short video of the whole process (1 minute, 31 seconds)

To create a small project like that you need to create a project using the "Win32 EXE" option when you create the solution.

CreateNewSolution
Creating a new source solution in Clarion 10

I also always uncheck the "Auto create project subdir" as I have normally create the folder before I create the solution, but if you haven't check this and it will create a sub folder with the name of the project.

The next step is to change the project settings.  In the Solution Explorer right click on the project node and select "Properties" from the popup menu.

Clarion10OpenProjectProperties
Opening the Project Properties in Clarion 10

In the project properties, select the "Compiling" tab and in the "Conditional Compilation Symbols" enter:

_ABCDllMode_=>0;_ABCLinkMode_=>1;_ITUtilDllMode_=>0;_ITUtilLinkMode_=>1
Clarion10SetProjectProperties
Setting Conditional Compile Symbols in Clarion 10

This will compile both the ABC classes and the Icetips Utility classes.  Note that this setting is for an EXE.  If you are compiling a DLL, then you need to switch the 0 and 1 in the settings above.

The first thing you need to do is to include the main header file:

  INCLUDE('ITUtilityClass.inc'),ONCE

I do this above the MAP statement.

Now you can use any code from the Icetips Utilities in your project.  For example:

ITU ITUtilityClass
 CODE
 MESSAGE('Icetips Utilities: ' & ITU.EXEName)

In the video below (no sound) go through each of the steps to make this happen:

I hope this may help some of you to use the power of the Icetips Utilities in your source projects 🙂

Arnor Baldvinsson

In Clarion 9.1 and 10 you can change the fonts for the IDE. This makes it easy to customize the IDE to look the way you want it to.  Personally I change the environment fonts to Segoe UI 9pt for dialogs and listboxes and Segoe UI 17pt for the Start page.

Clarion10FontSettings

I use good, old, boring Courier New 10pt for the editor but you might want to try Consolas, Lucinda Console or some other fonts.  Somehow I have ended up with one of Adobe's font on my laptop, "Source Code Pro" which comes in several different versions (black, semi-bold, light, extra-light)  The normal one looks pretty good, but I haven't really used it.  I have also used Droid Sans Mono which is a Google font.  If you want to find fonts to use in your editor, something other than Courier New, then go to fontsquirrel and have a look around.

Note that you must restart the IDE for the font changes to show.  This applies to all the font settings, also the Text Editor settings, which is a bit of a bother as you have to restart the IDE just to see how the fonts look like.  My suggestion is to load some code into WordPad and use it to pick a font that looks good to you and start from there.  WordPad has a nice feature where it will automatically reformat the text when you hover over a font in the font selection drop-down so it's easy to see how the font will affect the code.  See the video below for a demonstration.

Hope this will help you set up your environment to your liking:)

Update:  Here is an article, while from 2010, contains a nice collection of monospaced programming fonts:
http://www.codeproject.com/Articles/30040/Font-Survey-of-the-Best-Monospaced-Programming

Arnor Baldvinsson

It was brought to my attention today by Lee White that the manifest for Clarion 10 is set to "asInvoker" This means that the IDE is NOT elevated when it runs. This can cause problems.

2015-06-10_1239

For example if you are used to seeing the  "Process Running" message if you accidentally left the program running that you are compiling, you will not see that in Clarion 10.  It will simply give you an "Access denied" error at the end of the linking process.

To fix this you need to make a small edit in the Clarion.exe.manifest file in your Clarion\Bin folder.  If you load it into an editor you will see a line that looks like this:

<requestedExecutionLevel level="asInvoker" uiAccess="false"/>

Change this line to:

<requestedExecutionLevel level="requireAdministrator" uiAccess="false"/>

save it and you are done.  Now the IDE will open elevated and the "Process Running" warning will once again work as it should.  Note that to get the warning you must turn off the "Kill running process before build" or Clarion will simply kill it without prompting.

2015-06-10_1244

 

I have been running the Clarion IDE as elevated since Clarion 7 came out and never had issues with it.  But apparently some people have had problems so Softvelocity decided to change the manifest in Clarion 10.

Arnor Baldvinsson