Yesterday I uploaded some changes to the Icetips website that I hope will help make the site more accessible.  I'm working on a redesign that will be fully responsive, but that's going to take some time to complete.

We have changed the basic fonts so text is now more open and there is more white-space on the pages.  Colors have changed as well and the site as a whole is a bit brighter.  All the product pages now have tabs where there is information about features, compatibility, downloads and screenshots.

I have also added a "Version History" tab to 5 products, Utilities, Previewer, Outlookbar, Powertoolbar and Taskpanel.  The version history for the rest of the products will be up there soon and I will keep this updated as new releases are made.

The login page also has tabs with the latest downloads, blog entries and your profile, so it's easy to get to it all on one page.

For those of you in the US, I wish you all a happy 4th of July tomorrow:)

Arnor Baldvinsson

I have released two new product builds this morning.  Icetips Utilities build 1.2.2433 and Icetips Previewer build 2.7.392.

The Previewer build fixes a problem with the Page of Pages template which I found out was not working with the Legacy/Clarion template chain.  This build also includes the fix to scrolling under Clarion 10.

There are two new features in the Utilities that will come in very handy when dealing with importing comma separated files.

First is a new property, pDelimterStartsLine, to the SplitString method.  It allows it to split strings where the delimiter is the beginning of a line, not the end of it.  Normally SplitString splits strings based on CR+LF (<13,10>) characters at the end of the line.  Recently a customer needed to split a string that had no CR+LF pairs, but each record started with a specific string.  By implementing this change he was able to split up his file and read the data correctly.

The second new thing is the ParseCSVLine method.  It takes a line of comma separated CSV data and splits it into fields, stored in the CSVFields property of the Icetips String Class.  This method can take regular old CSV data and parse it into easily accessible field data. It handles commas in strings without problems so there is no worry about it getting out of sync if the data is otherwise properly formatted.  I have made it flexible so that you can specify if strings are quoted or not (if they are, the code will look for and ignore commas inside the string) as well as specify the delimiter to use (up to 4 characters).  The pStringsAreQuotes parameter defaults to TRUE and the pDelimiter defaults to a comma (,)  Check out the demo code in the help:

ITS  ITStringClass
S    STRING(255)
I    LONG 
F    LONG
X    LONG 
  CODE
  ITS.FileToLines('testcsv.csv')
  LOOP I = 1 TO Records(ITS.Lines)
    GET(ITS.Lines,I)
    F = ITS.ParseCSVLine(ITS.Lines.OL)
    ITS.ODS('Line: ' & ITS.Lines.OL)
    IF F
      ITS.ODS('  ' & Format(F,@n_3) & ' Fields from ' & ITS.Lines.OL)
      LOOP X = 1 TO F
        GET(ITS.CSVFields,X)
        ITS.ODS('    ' & Format(X,@n02) & ' ' & ITS.CSVFields.OL)
      END
    END
  END
ParseCSVLine example code (image)
ParseCSVLine example code (image)

There are also some fixes in this Utilities release:

March 10, 2015 The template could cause classes to export an older version which could cause "xxx is unresolved for export" errors when compiling exporting dlls.  Fixed.
May 24, 2015 Fixed a potential memory leak in the AddIntoParenthesis method.
June 27, 2015 Image Class ResizeImage method did not work correctly on reports.  Fixed.
June 27, 2015 Image Class ResizeImage did not correctly size images when it was called multiple times for the same image control.  Fixed.

Arnor Baldvinsson

In the new IDE you can align controls using the snap lines; the thin blue lines that pop up when you drag controls around in the window designer. You see it appear in the screenshot below between the "Property" radio button and the drop down control, indicating that they are being align by the bottom edge of the controls.

Clarion 10 Snap lines and distance lines
Clarion 10 Snap lines and distance lines

You can also see two short lines above the drop down, which indicate optimal vertical space between the drop down control and the two radio buttons above.  The distance lines appear for both horizontal and vertical spacing.

The snap lines also appear when you are re-sizing controls which can be both good and bad.  It's good when you need to size multiple controls to be the same width or height, but it gets in the way if you just want to re-size a control, like for example the "Me and related users" radio button which originally extended outside of the group control, overlapping the border of the group.

You can re-size a control by holding down the shift key and then using the left/right, up/down arrow keys.  But you can also re-size them by using the mouse and without the snap lines getting in the way.  Simply hold down the Alt key on the keyboard and re-size or move the control with the mouse.  It will now ignore the snap lines and you can re-size and re-position at will.  Release the Alt key and the snap lines immediately appear and the control snaps into place.

Snap lines also work with multiple controls selected.

Clarion 10 Snap lines on multiple controls
Clarion 10 Snap lines on multiple controls

I use the snap lines a lot when lining things up and also the distance lines to set the distance from one control to another.  To the best of my knowledge they are not customizable in the IDE's Options, which would be desired so the distance can be changed.

Clarion 10 Window Designer Grid Options
Clarion 10 Window Designer Grid Options

You also have the option to use grids.  In my (limited) experience with grids in other environments, they tend to be coarse and not very helpful.  But this is a matter of choice and taste so please try them out to see how they work and if you like them or not.

There is no option to turn both grids and snap lines off.  Either one is always turned on.  However, with the grids you can turn off the "Snap to Grid" effectively disabling it and if you uncheck "Show grid" then it will not show up either so with that you have turned both grid and snap lines off.  It would have made sense to have a "None" radio button there for the Align Mode, but with the ability to select Grid and then effectively turning it off, it serves the same purpose.

Arnor Baldvinsson

The right to vote is something we expect and hardly think about, but it hasn't always been that way.

One hundred years ago, on June 19, 1915 women in Iceland gained the right to vote after years of campaign.  4 years later Congress passed the 19th amendment to the United States Constitution guaranteeing American women the same rights.  In Iceland farm workers also got the right to vote at the same time.  At the time they were close to 40% of the male population above voting age.  This was similar to changes that happened in the early to late nineteenth century in the US, where first property ownership requirements were eliminated, allowing African Americans to vote and Native Americans in 1890.  Women in Finland were the first European women to get the right to vote, in 1907, but Switzerland the last, not until 1971!

My mom was a staunch advocate for women rights all her life.  She grew up in a place called Hælavík, in the far North West fjords of Iceland, a remote area that saw the population disappear soon after World War II.  You can view this area in Google Maps  Click on the "Show imagery" in the lower right corner of Google Maps and you can view photos from Hælavík.

Hælavík, a remote place in North West Iceland - Linked from https://jakobinasigurdardottir.wordpress.com
My mom, Sigurborg Rakel Sigurðardóttir, born August 29, 1919, died on March 24, 2005. Photo taken sometime around 1965 (unknown)
My mom, Sigurborg Rakel Sigurðardóttir, born August 29, 1919, died on March 24, 2005. Photo taken sometime around 1965 (unknown)

She worked hard all her life, as a maid, cleaning lady at the US Navy base in Iceland and for the last 40 years of her life she was a farmers wife, which wasn't always easy! She also worked in the local fish processing plant, slaughter house and herring salting stations for years.  She raked hay, delivered lambs and nursed them to life on cold days, rounded up sheep and milked cows.  She took pride in a clean and neat house which was not easy on a farm!  She cooked two hot meals every day, baked cakes and bread and made jam and berry juice.  Until 1973 she took care of making cream and butter and she always had chicken for fresh eggs.

Laila and I
Laila and I on our farm in Iceland back in 2002. My mom knitted the sweater I'm wearing.

She knitted socks, mittens and sweaters, sewed and patched clothes when needed.

Every summer for 25 years, from 1960 to 1985 she took in kids from her brothers, sisters or family friends.  They would stay the summer and help on the farm.  Usually two, sometimes three.  It was often tight in the small farmhouse, which was only about 700 sq.ft. but there was always room for one more!  We didn't get electricity on the farm until 1971 and it must have been a lot of work to wash laundry and take care of all those people.  My grandmother lived with us too until she died in 1970.  I never, ever, heard my mom complain about that there were too many people around - perhaps the contrary as she was very social.

In January 1979 she fell on snow covered ice when coming back from feeding her chicken and broke her right wrist.  It wasn't put together properly and it bothered her ever since.  She slowed down knitting after that as it hurt her hand pretty badly.

In March 1997 she was taken ill and probably had a stroke or something like that (it was never determined) In two weeks she went from being a little forgetful to full onset dementia.  From 1999 she and my dad lived in assisted living and later in a nursing home, where she died in 2005.  My dad passed away in 2003.  The dementia had progress so that the last time I visited in 2004 she didn't show any signs of recognizing me.  She was 85 when she passed away.  I felt it was appropriate to remember my mom on this day that meant so much for women of her generation 🙂

Arnor Baldvinsson

I have been working on Build Automator in Clarion 10 this week, along with other things.  Yesterday I discovered that there was something very odd going on with the resizing of the windows.  When comparing the Search and Replace window between the Clarion 6.3 version and the Clarion 10 version, it was like the listbox wasn't stretching like it should, as seen in the screenshot below.

06.17.2015-14.59
Clarion 6.3 window on the left, Clarion 10 window on the right.

After quite a bit of snooping around and posting on the newsgroup, where Bob Campbell pointed out the listbox size issue, I came to the conclusion that there was a problem with the WindowResizeClass.SetParentDefault method in ABRESIZE.CLW.  So to test it, I copied the one from Clarion 6.3 and omitted the original and lo and behold the resizing worked perfectly again!

After sleeping on it, I realized that the code change involved a new method of finding the parent control of a control, which doesn't have a PROP:Parent parent - kind of an orphan;)

In the class method the code figures out what type of parent controls there can be:

 CASE ThisControl{PROP:Type} + 0
 OF CREATE:Group
 OROF CREATE:Option
 OROF CREATE:Tab
 OROF CREATE:Sheet

This is missing both CREATE:Panel and CREATE:Region!  I'm using Panels all over the place on the windows in Build Automator and came to the conclusion that this is where the problem was.  So I added:

 OROF CREATE:Panel
 OROF CREATE:Region

to the list, re-compiled after omitting the Clarion 6.3 code, and it worked perfectly again:) The CASE statement is around line 580 in the ABRESIZE.CLW file if you want to do this fix to your class file.  I have reported this to Softvelocity and hope they will fix this in the next release.

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

I have released Icetips Previewer build 2.7.391 with a fix to the problem with mouse wheel scrolling in the previewer window under Windows 10 that I blogged about yesterday. The fix seems to take completely care of the problem and have no ill effect on previous versions of Windows that I can find.  If you run into any problems with it or it seems to behave differently, then please let me know!

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