Bug in Clarion Resize class – with a fix!

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

Leave a Reply