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.

Wednesday, August 27, 2008

Vista 64, VMWare, XP32, Clarion 6.3, CHT

This is probably not news to a number of you who are already set up this way and work with VMWare under Windows Vista 64.

I bought a new laptop a few weeks back and decided on the recommendation of Jack Leininger at Fabtex ( a CHT customer) to buy a nice, compact 14 inch HP laptop with 4 gig of RAM and Windows 64 installed. I was going for maximum mobility here, not screen size so I asked specifically for the smaller screen size and a good, thin case.

Again on Jack's recommendation I added VMWare and installed 32 Bit Windows XP as a working O/S to use with Clarion 6.3.

That all went well and this arrangement is flawless. The Clarion installation and CHT in this environment run quickly, and efficiently. It's also a great way to multi-task with Clarion 6 and CHT Compile Manager in the mix, since you can minimize the 32 bit environment when it's busy and do some correspondence or other work back in the 64 bit environment or even in a second or third Virtual O/S set up this way.

Windows Vista 64 has proven to be painless experience compared to earlier Vista 32 encounters. If you're into multi-tasking and 32 bit O/S variants this is a great way to go.

Cheers...
Gus M. Creces
http://www.cwhandy.ca/
http://news.cwhandy.ca/

CHT Build Update 12C1.01 Posted

We've just updated the 12C1.00 build to 12C1.01.

This includes some necessary changes for better backward compatibility to C6.1 and C6.2. Perhaps a waste of time since it appears there are only 2 of you in our subscriber base still using these older Clarion 6 builds.

It also includes some unfinished business with some of the SQL demo apps, particularly HNDSQL9.APP which uses ListBoxBrowseExtender, plus two of the new SQL extensions to build a browse application very similar to a HandyMarkerBrowse (like HNDSQL8.APP) but without using an ABC browse at all. All aspects of filling the listbox are entirely under your control. This app was constructed by a combination of ABC and CHT templates (ABC Window + ListBoxBrowseExtender + QueryparsingFilterControl) and a few hand-embeds. This browse does away with a lot of ABC code that slows data access and makes browses waaaay more complex than they need to be.

If you think this is useful to you, we're willing to formalize this approach into a single procedure template that lets you build a procedure like this without the hand-embedding. The procedure template will populate the necessary pieces for you and complete the embeds based on your completion of template prompts.

On the other hand, if you don't think it offers anything new, we're also happy to leave this just as it is, an example of how to build an SQL browse without an ABC browse template. I'll wait to hear from you all.

We've put off documenting C121.01 until these final changes were complete. At the same time I've personally been occupied with contract development work that takes up a lot of my time these days. I've got time this week, to get some of those 12C1.00/01 features to you now and perhaps a few new videos.

We've taken SQL tracing even further in 12C1.00/01. You're now able to trace directly from a specific browse directly to CHT SQL Trace without turning on full SQL tracing. This new mode is called "Direct Trace". You can experiment with this using HNDSQL7.APP, HNDSQL8.APP and HNDSQL9.APP if you recompile them in debug mode. The browses in these apps will output directly to CHT SQL Trace if you put it in [DIRECT TRACE ON] mode.

Also in HNDSQL7.APP and HNDSQL8.APP, take note of two alternative ways to fill the browses, particularly OBJ.SQLSelect().This method lets you fill an ABC browse queue using an SQL select statement. The method interfaces to the ABC method SetQueueRecord() for queue filling, in a manner that stores the VIEWPOSITION as required by all ABC browses.

And in HNDSQL9.APP take note of a method called OBJ.SQLSelectQ() which fills your list box queue for you exclusive of an ABC browse being present. Take note also of a record fetch method used in this app called OBJ.SQLSelectRecord(). If you're familiar with SQL you'll find these new methods, and others I've added to be more compact and more transparent than standard ABC file object syntax.

The latest docs can be found in your installation or here:

CHT Templates By Category
CHT Demo Applications
CHT Templates New/Revised In 2008

Cheers...
Gus M. Creces
The Clarion Handy Tools Page
http://www.cwhandy.ca/
http://news.cwhandy.ca/

Friday, August 15, 2008

Clarion 7 Application Generator Preview

It looks like we're finally getting close to a C7 version with a working application generator. There's a video up on SV's blog site showing the C7 Appgen in action.

If you haven't seen this you should take a look here:
C7 Appgen Video

As you watch this, keep in mind that C7 And Clarion.NET share IDEs, which implies that there already exists a template generator for Clarion.NET - even though there probably aren't any templates yet that generate Clarion # code.

We're releasing build 12C1.00 on the weekend and most of the pre-compiled utility apps (CHT Compile Manger, CHT Colorizer etc.) in this build are pre-compiled in C7. We do this just to confirm in your mind that CHT classes are ready to be used as/is in the context of C7.

And by corollary, if the C7 Appgen interprets C6 templates correctly as in the video, we can soon begin testing our suite of demo apps entirely in the context of C7.

Cheers....

Gus Creces
The Clarion Handy Tools Page
Visit Website

Wednesday, July 2, 2008

About Optimize For SQL Option

Just a reminder that those of you with SQL apps, should be taking a look at the JULY 1, 2008 what's new page: What's New July 2008 to read about the new option switch called "Optimize For SQL" found on the "Use SQL" dialog of ExplorerBrowse and HandyMarkerBrowse (soon als implemented on LocatorOverrideControl).

For a while now, I'd been noticing that under certain conditions C6 SQL apps produced more than one SELECT statement per browse query or per browse order change. In theory to change browse order to descending from ascending, one would issue the identical select statement with a DESC following the fields in the ORDER BY clause.

What I was seeing, in reality, was this:
• When the browse queue was empty, the browse produced generally one or two select statements per new query, one select statement to issue the select that filled the browse and one select to reget the currently selected record into the record buffer (to honour the new selection event).

• When the browse queue had records already in it, the browse produced generally 3 or 4 select statements per new query. One select statement to fill the browse forwards from the currently selected record; One select statement to fill the browse backward from the currently selected record; One select statement to fetch the currently selected record into the record buffer. And sometimes a fourth select was issued if the fill-forward or fill-backward phases, bumped into the end of file or beginning of file condition. This wonky behaviour is supposed to be controlled by setting the RetainRow driver flag off in the ABC classes. Even SV's documentation recommends that retain row be turned off for SQL, yet the current crop of C6's behave as if retain row is on even when it's off. That behaviour is hard coded into the ABC BrowseClass INIT method.

In earlier iterations of Clarion, I'd spent quite a lot of time getting Clarion ABC browses to "cut the chatter" to the point that a single select per browse query or per browse order change was issued. I don't know when C6 ABC classes and templates changed to wrestle away the well controlled ABC-browse situation we'd had till that point, but they did, somewhere along the way.

The "Optimize For SQL" switch on our browse templates, lets you optimize your browse so that only a single select is issued for any new browse condition such as a query change or an order change. I suggest you compare this yourself on your own SQL apps, using HNDSQLTRACE.APP to trace various browses with and without the "Optimize For SQL" switch turned on.

Cheers...
Gus Creces
The Clarion Handy Tools Page
Visit Website

About HNDSQLTRACE.APP 2.01

Earlier today I uploaded HNDSQLTRACE Version 2.01. This has the following new features:

• The ability to have a File Based Trace (will trace any C6 Clarion SQL App).

• The ability to have Direct-From-App Trace (requires other CHT template applied to traget procedure). There's a menu item to set to one or the other of the above two settings.

• The buttons have been removed from the tool bar and have been replaced with menus. Three of the key menu items have now been given System Hot Keys. F9 (Clear) F10 (Read Next) F11 (Minimize/UnMinimize). The advantage of these system hot keys is that the trace app does not have to have focus for you to apply these commands to it.

• There's an entry control now on the tool bar that when doing a file trace, any table name entered in here is filtered out of the trace, so that if you have SQL stuff appearing in the trace, say from something like INIFile, you can have the trace extract them by entering INIFile in the field provided.

At the moment, the Direct-From-APP trace is transmitted only when you apply HandyQueryTracingButton_EXPB (for ExplorerBrowse) or HandyQueryTracingButton_HNDMB (for HandyMarkerBrowse) on your browse. You can see how I've applied these, and test the Direct-From-App tracing feature on demo apps HNDSQL7.APP and HNDSQL8.APP.

In the next iteration, perhaps as early as the beginning of next week, I'm going to add a dialog on our browse templates that let's you opt to have the browse intercept trace on/off commands directly from HNDSQLTRACE. A hot key in the trace app will send a command to the Browse Procedure to have it turn on it's tracing communications and to start talking to HNDSQL trace.

Cheers...

Gus Creces
The Clarion Handy Tools Page
Visit Website

Tuesday, July 1, 2008

CHT Changes Posted To WEBUPDATER July 1, 2008

We've posted another update on the road to Build 12C1.00 at the end of July, 2008.

This adds another new locator: HandyMarkerBrowseLocatorControlEx which has the same features for HandyMarkerBrowse that we introduced last time for ExplorerBrowse. There are also two new demo applications that apply these locators. They are HNDSQL7.APP - illustrating ExplorerBrowseLocatorControlEX - and HNDSQL8.APP - illustrating HandyMarkerBrowseLocatorControlEX.

The new demo applications implement an optional new feature available on the "Use SQL" tab of the two templates, ExplorerBrowse and HandyMarkerBrowse. This feature optimizes the SQL select statement and cuts down the chatter. Use HNDSQLTRACE.APP on the two demo apps and you'll see the difference when you run the trace first with the "Optimize For SQL?" switch on and then recompile and trace with the switch off. Let us know what you think, this totally eliminates the secondary selects that Clarion browses normally perform as they try and backfill to the currently selected record.

HNDSQLTRACE.APP has been changed. Compile and use HNDSQLTRACE.APP to test the two new apps by setting HNDSQLTRACE so that "Direct Trace On/Off" is checked.

This new feature lets you drop a HandyQueryTracingButton_EXPB or HandyQueryTracingButton_HNDMB directly on your browse, as we have in HNDSQL7.APP and HNDSQL8.APP, respectively. These button templates cause the procedure on which they're applied to communicate directly with HNDSQLTRACE.APP.

Cheers...
Gus M. Creces
The Clarion Handy Tools Page
gcreces@cwhandy.com

Sunday, June 29, 2008

CHT Changes Posted To WEBUPDATER June 27, 2008

We posted some changes to CHT WEBUPDATER June 27, 2008. This was not done as a version change for the time being, as the basic CHT classes and templates have not changed from the 12B1.01 which you've had since May 22, 2008.

At least until the end of July 2008, which is our target date for the release of build 12C1.00, there are going to be fairly frequent periodic updates without version number changes in order to introduce some new templates into the system so that an SQL project I'm working on can make use of them. You can feel comfortable downloading this un-reversioned update since it does not affect existing templates and classes that you've already been using. And it will give you a chance, if you're interested, in getting a preliminary look at some new templates,many of which are going to be targeted at SQL.

In this upload is a new template called ExplorerBrowseLocatorEx. This is an expanded version of ExplorerBrowseLocator (hence the "EX" suffix) that adds some features:

•  A "Go" button beside the locator to execute the locator. (Tab still works as before).

•  An automatic pass-through of the browse's "Data With Query Only" feature when the locator is set up as a filtering locator. This does work in the previous locator, but not if you've embedded your own filter into the browse. This new control lets you embed your own filter in the browse's ApplyFilter method, and still enforce "Data With Query Only" so that nothing displays unless the locator has been used.

•  There is a more sophisticated algorithm for "Drill-Down" in this locator, including a "bread-crumbs" string control that displays the current query, either as SQL or as CHT Query language. This works like "QBE", or "Query By Example" if you set the locator for "Drill-Down" since you can filter on multiple columns one after the other just by clicking on them and entering a new value in the locator. The new query is ANDed to the previous one until you click the Clear button.

Also coming for this new locator - when in filtering mode - is the ability to define on a column-by-column basis what the query keyword is for that column. So, a date or numeric column can use EQUAL while a text column can use CONTAINS.

There will be an equivalent locator for HandyMarkerBrowse early in July.

We're also working on a new SQL trace feature for CHT browses using HNDSQLTRACE.APP. This isn't available yet in the June 27th posting. The next HNDSQLTRACE.APP will have a filter feature that lets you trace a particular table or exclude a particular table. You'll also be able to direct output from our other SQL trace features, for example HandyQueryTracingButton_EXPB into HNDSQLTRACE.APP and a new option on that template lets you opt to see the entire SQL select including WHERE and ORDER BY.

More SQL-related features coming. I'll tell you about those as they are introduced and uploaded for you to try. We're about ready to release an "Experimental" switch on all CHT browse extension templates. This feature optimizes your CHT-extended ABC browse for SQL by overriding some of the ABC browse features that were really intended for ISAM tables and get in the way of SQL.

We're calling this "Experimental" because it's not default behavior, you have to turn this setting on to invoke the features set. We're going to let you try this feature on your browses for a while by way of an "experiment". Primarily it reduces the amount of SQL "chatter" that ABC browses - especially page loaded browses - tend to produce and slows them down. We'll be looking for your feedback on the impact of this on your SQL browses and, of course, we're prepared to take your questions and suggestions for improvements.

Cheers...
Gus M. Creces
The Clarion Handy Tools Page
http://www.cwhandy.ca