The CHT Blogger

Thanks for your interest in The Clarion Handy Tools, an awesome collection of productivity enhancements for Clarion developers. These tools consist of an ever-expanding set of Clarion Templates and OOP Classes that extend or complement the normal functionality of the Clarion Application Development System from SoftVelocity.

Monday, February 22, 2010

Small CHT (for C7) Update Posted Today

Discoveries made over the weekend have motivated me to do a small, not-renumbered, update this afternoon.

Earlier in the weekend I posted a problem with ABPROGRM.TPW one of SV's base application templates which due to the use of
#OPEN('PROG02.$$$') instead of #CREATE('PROG02.$$$') causes corruption of generated .CLWs under stress circumstances and particularly on XP machines. The problem caused by this bug is actually worse than I'd imagined - especially on XP machines.

The gist of the above bug is that #OPEN is used to create a fresh temp file instead of #CREATE. Thus, whenever PROG02.$$$ from a previous app is not erased - say by a template error, C7 then generates information from the current app into a temp file file created by a previous application or module. I've seen this numerous times, especially when compiling apps using CLARIONCL.EXE the DOS-prompt utility for generating applications.

I discovered yesterday, when perusing the SV newsgroups that C7 has a bug with the REMOVE command. In C7 (particularly in the context of XP) this command produces an errorcode 5, even though the file was successfully removed. Since the C7 template generator uses the C7 runtime library, I tested #REMOVE, the template version of REMOVE. It has the same problem.

So combining the #REMOVE bug with the #OPEN/#CREATE bug, you can see that the incidence of corrupt .CLW file generation is quite high - in the context of XP in particular.

The remove bug also explains why a utility called HNDABCHKC7.EXE was not correctly fixing the ABUTIL.INC file and changing the prototypes the way that it should have been. C7 users had to run WEBUPDATER C7 to have this change take place because C7 Webupdater is actually compiled in C6. The HNDABCHKC7.EXE utility is compiled in C7 and is executed from the C7 templates such that should you load C7 with any app containing CHT templates, the utility runs and make the ABUTIL.INC change for you without you having to do anything. Our C6 templates have done this for a number of years. The problem was C7 REMOVE is broken.

So, I've reposted our C7 build with a workaround to account for this C7 REMOVE bug, both in the CHT classes and in our templates. Further, I've reposted a new version of HNDABCHKC7.EXE compiled with this workaround.

I've also spent some time reworking HNDCOMPILE.EXE and have re-recorded the accompanying video to provide more concrete examples showing queries.

That new HNDCOMPILE.EXE video is here: HNDCOMPILE VIDEO. This is a 3.5 MB video so give it some time to download.

When you run your Webupdater C7, the changes discussed above will come down to you in the usual manner.

Oh, one other thing. Our HNDABCHKC7.EXE utility, looks for and automatically corrects this #OPEN/#CREATE bug reported above when you open any app that contains a CHT template. Of course the utility only does this if the correction is required. HNDCOMPILE.EXE also checks and makes the correction should it be needed, when you run HNDCOMPILE.EXE as illustrated in the VIDEO. Down the line, when SV makes a permanent correction, I'll remove these double checks.


That's all for now. Have Fun.

Cheers...
Gus Creces
CHT
Visit Website