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.

Tuesday, August 4, 2009

CHT Build 13C1.00 New Features Review

Background - HandyJDOAdapter Template



The HandyJDODataAdapter template is an existing CHT procedure template used to create CHT Client Server data packaging procedures. It creates procedures that hook into a CHT server application by attaching to the main server via a server VIEW created there with a server-plug-in template called ClientServerQueryBrancher_BIC. All remote web-client queries directed at a particular VIEW name are routed by the server through a HandyJDODataAdatpter procedure attached to a matching VIEW name. A server may have numerous versions of this data packaging procedure- as many as the data requirements of your application dictate - each servicing a different back end data view consisting of one or more data tables. So asking, "How many HandyJDODataAdapter procedures does my server require?", is a lot like asking, "How many browses does my application require?" Depends. It's basically up to you to decide.

Extra Generation Control Features HandyJDOAdaper Template



A new dialog called "Generate" has been added to the HandyJDODataAdapter template (see image below). It's purpose is to give you more control over the existing code-generation features of this template and to add some new features particularly useful with SQL back ends - situations where your server is serving data to a web client application from an SQL data base without directly exposing the data base to the web.


aug_07_001.gif



The "Generate" dialog has been added as indicated above, just below the existing "Files" dialog. See the next image for the details of the dialog itself.


aug_09_002.gif



No Generate SetUpdateRecord() Pre-fetch Code

Inside all HandyJDOAdapter procedures is an OOP method called SetUpdateRecord(). This method is used to fetch a record - or a set of records described in a Clarion View - before updating or deleting. Your client will send an unambiguous filter that describes exactly one recordset during an update or delete operation. This filter is usually something as simple as CUS:SysID = 1234. The fetching operation is called a "Pre-Fetch" because the fetch is accomplished - and required - before the actual update or delete operation can take place.

There are also times when a "Pre-Fetch" using SetUpdateRecord() is required even in an "INSERT" operation. Inserting a child record to an invoice header,for instance, may require you to pre-fetch the header record so that the ID of the header can be primed into the child record's join field. Or you may want the child record to contain data from a related record as, for example, the CHT Support Forum does, where a copy of your original posting is inserted into your REPLY.

Suffice to say, that how and when your pre-fetch is performed can depend significantly on your data design. This first dialog "No Generate SetUpdateRecord() Pre-fetch Code" stops generation of default pre-fetch code so as to allow you to insert case-specific code of your own design.

Generate SQL-Style Primary Table Fetch



When you check, and set ON the "No Generate SetUpdateRecord Pre-fetch Code" switch mentioned above, the second switch, "Generate SQL-Style Primary Table Fetch" becomes enabled. This generates a simple fetch on the Primary Table in your procedure's data view based on the "FetchFilter" being passed up from your client. With this switch set, you don't need to write the SQL-style fetch code yourself, if what's generated applies to your design. The code generated looks as follows and, as already stated, applies only to the Primary table in your view.


aug_10_001.gif



By juggling your view layout, you can often achieve the end result you want in order to pre-fetch the data record you want without writing any code. However, you must decide whether the code created by the template is what you want or need. If not, leave "Generate SQL-Style Primary Table Fetch" unchecked and write more complex pre-fetch code that better fulfills your design. These switches give you the option of doing that.

No Generate TakeWebUpdateRecord() HTTPInsert Code



Also inside your HandyJDOAdapter procedure is an OOP method called TakeWebUpdateRecord(). This method is used to actually perform record INSERT, UPDATE and DELETE operations at the command of your web client. This specific switch lets you turn OFF code generation of the INSERT code normally produced by our template. That provides you with the opportunity to craft your own insert code based on specific requirements that our template has not forseen or generic insert code just won't handle. The image below, illustrates some hand-embedded code in a server I recently created. The main bit of knowledge you need to have that is CHT server specific is the return value after a successful insert.


aug_10_002.gif



There are three requirements after a successful insert. These are: 1) Call xServer.SetCurrentQuery() with the filter statement that your CHT server will use to refetch this new record just created. This is a simple, unambiguous "FetchFilter" used to recall this newly inserted record. 2) Set the procedure returnvalue to HPROP:WebCycleToEdit. The server uses this value to literally switch itself into update mode and return the data to your web client app now operating in update mode. In other words, the record is pre-inserted and returned to your web-client primed to the extent your insert requires and the client form procedure completes the record. 3) The procedure return error code is set to HND_MESSAGE_BRWSVR_CYCLE_EDIT This is really not an error code, just a signal to the main server code that it should go into edit mode using the record just inserted.

What If The Client Cancels An Insert Operation?



While we're on the topic of web-client record insertion, since records are pre-inserted by the server - for obvious reasons - what happens if the web-client operator decides to cancel record insertion? There are two ways to handle this. They can be used exclusively by implementing one or the other, or they can be used together. Each server back end data packaging procedure built with HandyJDOAdapter is always populated with another template called ClientServerDataBuilder.
This template describes the tables, the view and the fields to be operated on by the procedure. It provides among other things a dialog called "Garbage Collection" (see image below). Here you can describe a background operation that purges incomplete records on a time scale determined by you. The purging operation requires a few specific fields that signal to the server that a record has been abandonded without having being completed.


aug_10_003.gif



If you don't want to avail yourself of this "Garbage Collection" facility - implemented on the server end - you can simply configure the client applicaton to delete the pre-inserted record if the user cancels out of insert mode without completing and saving the record. That's a more traditional, Clarion-like behaviour to handle housekeeping of cancelled inserts (see image below).


aug_10_004.gif



No-Generate Query Keyword File Fetches



A built-in capability of all CHT Back-end data packaging procedures created with HandyJDODataAdapter is the ability to dynamically switch in or out, query keywords from the application's configuration file. For example, you might have a server that serves both English and French users who are operating browses that allow them to construct native language queries using CHT's query builder or QueryParsingFilterControl. With a signal from the client indicating French or English, your data procedure can, in real time, read and BIND the approrpriate set of Query Keywords from it's configuration file and thus be able to interpret both sets of queries from either French or English clients. The switch "No-Generate Query Keyword File Fetches" turns off this dynamic query keyword capability in favor of the query keywords that you've pre-configured on our template. Doing so generates less code - that you probably aren't using anyway - and eliminates the requirement to complete the "Server Variables File" dialog on our ClientServerDataBuilder template (see next image). In fact, this "Server Variables File" dialog becomes disabled when "No Generate Query Keyword File Fetches" is checked.


aug_10_005.gif



That concludes "Build 13C1.00 Feature Review Part 3" describing changes on the HandyJDODataAdapter template and how they impact other parts of your server/client systems.

Cheers...
Gus Creces
The Clarion Handy Tools Page
www.cwhandy.com
support@cwhandy.com
August 4, 2009

Monday, August 3, 2009

CHT Build 13C1.00 New Features Review

Client Server Hardware Key Login



Normally I do this the other way around, releasing the new build and then reviewing the features. This time, I'll review some of the key new features this week and then
with any luck, I'll be finished the final touchup on Build 13C1.00 before week's end August 7th.

I've had the opportunity this summer to work on a project that required the software to be locked to the hardware on which it is installed. Since this is also client-server software, requiring a login and download of stock market and money market data for display, I was able to use a standard CHT Client Server with some strategic changes to achieve a login-style data connection to an MSSQL server as well as a software-locked-to-hardware condition. These strategic changes are now reflected in Build 13C1.00 templates.

This is not to say that hardware key login could not be achieved without these latest template changes. Obviously, before a template can be written that generates code, somebody has to write the code that's going to be generated first. After writing and testing and re-writing the concept, I was able to abstract the requirements considerably in order to have the template help CHT developers achieve a Hardware Key Login.

Normally a CHT server login requires three pieces of information. I normally use Last Name, Email Address and a Login ID. There's nothing that says you actually need to use those specific bits of information, at least not the Last Name and Email Address, these fields and keys can be juggled on the template interace to use something else which is appropriate. The Login ID, on the other hand is more rigid concept and harder to work around since it is assumed to be numeric and unique.

For this login the customer wanted to use a USERNAME and PASSWORD only for the user to fill in at login time. But he wanted the software to "lock itself to the hardware on which it was installed". That means, once installed, and run on a given computer, it will not connect to the back end using any other computer even though it' s copied or installed there, and the USERNAME and PASSWORD are known. This prevents users in an office setting from buying one license of the software and sharing it amongst themselves in the office.

The concept is flexible enough that if the user wants some time later to move the software to another machine, he can contact the vendor and the hardware key can be purged from the customer's data record, allowing the software to be installed successfully and locked to a different machine.

In the background the application creates a HARDWARE KEY, a unique piece of data consisting of something which is unique to the machine on which it is running. You can use a combination of things such as the hard disk serial number or the primary MAC address or you can simply have the installer generate a GUID which is written into the registry and encrypted. This HARDWARE KEY is used as the third piece of login data along with USERNAME and PASSWORD instead of a LOGINID.

The first time the user logs in, the login is achieved by USERNAME and PASSWORD only because the hardware key field in the data base is blank. During the first login, that hardware key - which is passed up with each login - is written into the data base and left there. After that, subsequent logins are achieved via the hardware
key in combination with the USER NAME and PASSWORD. The same user running the software on a different piece of hardware is not allowed to log in since the hardware key generated on that machine is different than the one now stored in the data base against his other credentials.

Hardware Key-Style Login Specifics



Once you decide that a hardware key-style login is what you want, a lot of the work is done for you by the templates. Your back-end tables require aslightly different combination of fields than normal, but not all that much. You need a string(100) hardware key field in place of the usual numeric login ID field. Our back-end table also contains UserName and Password fields. This is not strictly necessary, as you could use any two other fields, for example, last name and email address as long as these two fields, used in combination, provide a unique key value that results in the ability to make an unambiguous fetch on the data base.

Since our example is an SQL implementation, our data table does not actually have any keys other than the standard SYSID. Our clarion dictionary, of course, declares a unqique key on the hardware key field and on the combination UserName+Password fields, but these key declarations are only there for the Clarion file drivers will generate the correct SQL SELECT. These keys are not actually required to be in the data base table declarion.

Initially, let's take a look at a new button on the "File" dialog of the BrowserServerInitializationControls template, called "Implement Hardware Key-Style Login" (see image below).

aug_09_001.gif



Notice here that the first two fields of the file dialog are completed as usual with the user or customer table name and sysID key. The third field receives the HARDWARKEY unique key and the fourth field receives the unique compound key consisting of USERNAME and PASSWORD. Again this compound key could be any two values, for example Last Name and Email Address, which in combination can be used to obtain a unique value for login. In our implementation the USERNAME and PASSWORD are completed on the client application's login interface by the user. The hardware key is code-dervided by the client application.

The "Implement Hardware Key-Style Login" dialog explains these concepts again and requires only that you check the switch provided (see image below).

aug_09_002.gif



If your key field design matches these requirements your hardware key-style login implmentation is complete, on the server side at least. Checking the switch (above) to the ON setting causes our template to not generate the standard LastName, Email Address LoginID login and instead the code pictured below is generated into the Server.TakeLoginDetailsRequest() procedure (See image below).


aug_09_003.gif



I've heavily commented the generated code above so the implementation should be clear enough. The first time a user logs in with a USERNAME and PASSWORD,
the hardware key is not yet stored. The user is warned that he must initially install to the machine on which the software will be used. Initially the generated code attempts to retrieve the user account using the hardware key. This will fail under two conditions, either the user has never logged in before,and his hardware key is not yet stored, or the user is logging in with the correct user name and password from the wrong hardware. If the hardware key exists in the file, the user name and password provided are qualified against the account on file, and if these match, the login is permitted. If the hardware key is not found, the user's account is fetched using the unique combination USERNAME and PASSWORD and the hardware key provided is stored to that account and the login is permitted.

Hardware Key-Style Login (Client-Side)



On the client side, to accommodate hardware key-style login, we've provided a new method called "ThinClientHardwareKeyLogin()" (see image below).


aug_09_004.gif



Inside our client application all the necessary information to perform the hardware key-style login is collected and passed in the ThinClientHardwareKeyLogin() method - before the PARENT call. This makes it easy to debug any login problems on the client application side.

The following properties are completed here, only one of which is unique to this hardware key login. The properties initialized are as follows:
The first two properties - Encryption and Compression - are determined strictly by the client. The server does not have to be told about them in advance. Since the client communicates the encryption/compression states to the server during the transaction and the server responds in kind based on the state information provided in each communication. Encryption is not static, nor is it predictable, every single communication between client and server is uniquely encrypted.


SELF.SetUseEncryption(True) !We've turned encryption on.

SELF.SetUseCompression(True) !We've turned compression on.

SELF.RemoteUrl = CHTDataServerURL !This can be hard coded in the app or determined by app configuration.

SELF.RemotePort = CHTDataServerPort !This can be hard coded in the app or determined by app configuration.

SELF.LoginID = 0 !This property is not required to be set in a hardware key style login.

SELF.HardwareKey = MOD:HardwareKey !This new property (STRING 100) is provided with any static hardware-unique key you decide to derive in code.

SELF.LastName = UserName !This property value comes from a UserName field completed at login.

SELF.EmailAddress = Password !This property value comes from a Password field completed at login.



Note that there are no separate HNDCLIENT properties for USERNAME and PASSWORD. We're placing this information into the SELF.LastName and SELF.EmailAddress properties.

If you check in the server code, you'll see that the server is picking up the "lastname=xxx" tag from the client and passing it to the server's UserName data
field while the "emailaddress=xxx" tag is passed to the server's Password data field. In fact any two pieces of information that in combination provide a unique value can be used as the login, using these SELF.Lastname and SELF.EmailAddress properties. The server and client just need to understand ahead of time what combination of fields will be used.

That completes Hardware Key-Style Login. In the next posting, Build 13C1.00 Feature Review Part 3, I'll cover several new CHT Client Server features having to do with SQL implementations.

Cheers...
Gus Creces
The Clarion Handy Tools Page
www.cwhandy.com
support@cwhandy.com
August 3, 2009

Thursday, June 4, 2009

CHT Support Forum Improvements

Internet Cable Repairs



On the weekend we had the cable company come in and make some cable repairs and that made a huge difference in our upload speed which should normally be in the range of 1-1.5 megabits per second. Due to cable failure problems that had deteriorated to .2 to .3 megabits per second. Now, with those repairs completed, we're back to normal speeds and the support forum is as snappy as it ever was.

CHT Support Forum Work Flow Changes



We've also made a helpful work flow change to the message submission steps. In the past you entered a message in the message editor and on saving, you were taken directly back to the browse with your just-posted message at the top. As of yesterday, on clicking "Save" to post your message, you're taken to a preview screen which lets you see your message the way others see it, rather than in text edit mode. This lets you see any images you may have embedded, as well as any special characters, exactly the way others will see your message.

From this message preview screen you can then return to the browse using the new "Browse" menu item near the top of the window, where your menu has always been. By clicking this you're taken back to the messages browse with your message on top.

clickbrowse2.gif


If what you see in the preview isn't quite what you intended, just click the "Open" button beside your message as you've always done. That drops you back into the editor. Our forum lets you edit your message as many times as you like, or post addendums. Message threads and all the rest work exactly as before.

reeditmessage2.gif



CHT Forum Is A Source APP In Subscriber Tool Kits



In case you're not aware, the CHT support forum server app is actually provided to subscribers in source application format along with approximately 130 other applications, described here. You can compile it, and modify it to suit your your purposes.

Cheers...

Gus Creces
The Clarion Handy Tools Page
www.cwhandy.com
support@cwhandy.com
June 4, 2009

Monday, June 1, 2009

Four CHT Example Applications For You To Try

If you're a CHT subscriber, the four applications discussed here are demos provided for you in source application format as part of approximately 130 different example applications included with our tool kit.

One and all, CHT subscribers or not, you're invited to download these fully functional applications built with C7.0.0.5646. I personally use these applications on a daily basis in my day to day business affairs. You're welcome to download them and use them too, no strings attached.

The installer is packaged in a .ZIP file built with our toolkit's zip functionality. Once you have the zip, please extract the-web installer executable before attempting to run it. Since these demos use web installers - built by another CHT application also included in source with our toolkit - the actual installed application is downloaded from our website in the form of an .HZO file, a topspeed file containing a compressed and encrypted application and any related DLLs. Windows VISTA will pop up an approval dialog when the application first contacts our website. You'll need to approve that before the installer is allowed to proceed and complete the installation.

All applications are placed in an All Programs folder called "CHT" from which you can start them. An uninstall link is also provided for each application, for those of you just kicking tires.

Everything provided here, the demos, the installers, even the zips are built with Clarion 7 and The Clarion Handy Tools only. Nothing else. Remember as you read this what one of your happy users says about CHT:

http://www.cwhandy.com/hnd_dozen.gif


Handy Zip'N FTP


HNDZIPNFTP.APP combines CHT's zip file creation capabilities with CHT's wide-ranging FTP powers to provide a "Handy" utility that assists with backups to a virtual web space. The application can be pre-configured to back up a particular directory using a file mask and/or a CHT Query that describes the files to be backed up, resulting in a standard zip file that can include source subdirectories right inside the zip. An FTP configuration dialog lets you preconfigure one or more target FTP servers and web directories to accept your zip file. Once configured, your application can build a backup with one button click and send it to an FTP server with a second click.

Download it here: Handy Zip'N FTP

Handy Zip'N Email


HNDZIPNEMAIL.APP combines CHT's zip file creation capabilities with CHT's wide-ranging EMAIL powers to provide a "Handy" utility that assists with sending zips via SMTP email. The application can be pre-configured to back up a particular directory using a file mask and/or a CHT Query that describes the files to be backed up, resulting in a standard zip file that can include source subdirectories right inside the zip. An SMTP configuration dialog lets you preconfigure one or more target SMTP servers to accept your zip file. Once configured, your application can build a backup with one button click and send it to one or more recipients with a second click.

Download it here: Handy Zip'N Email

Handy HTTP Zip'N Post


HNDHTTPZIPNPOST.APP combines CHT's zip file creation capabilities with CHT's wide-ranging HTTP powers to provide a "Handy" utility that assists with backups to a virtual web space. The application can be pre-configured to back up a particular
directory using a file mask that describes the files to be backed up, resulting in a standard zip file that can include source subdirectories right inside the zip. An HTTP configuration dialog lets you preconfigure a target web server (IIS-type or CHT-type) and a web subdirectory to accept your zip file. Once configured, your application can build a backup with one button click and POST it to a web server with a second click.

Download it here: Handy HTTP Zip'N POST

CHT Video Education Player


While this media player is set up to stream .WMV versions of CHT educational videos from our website, it also serves as a model for developers wishing to build their own streaming video players. The player is built on CHT Template HandyComMediaControl which uses the Windows Media Player COM object based in WMP.DLL. The player is capable of playing off-line any videos which have been previously viewed to completion. On-line viewing of uncached videos begins quickly, once approximately 5 percent of the video has downloaded, and already-cached videos begin immediately since they are not downloaded again. If you plan to adapt this application to act as a video player for your own videos, a useful, accompanying application called HNDBUILDVIDEOLIST.APP can build video index files on your CHT-based video server, of the type utilized by this application and by the HNDWindowsMediaPlayer class (HNDWMP.INC, HNDWMP,CLW, HNDWMP.TLB).

Download it here: CHT Video Education Player

A summary of all currently shipping CHT Demonstration applications is available here:
CHT Applications Summary (HTML), or here CHT Applications Summary (PDF)

Cheers...
Gus Creces
The Clarion Handy Tools Page
www.cwhandy.com
support@cwhandy.com
June 1, 2009

Friday, May 1, 2009

Build 13B1.00 Update Posted Today

CHT Auto-Backup Configurator Now Provides .APP/.DCT Restore Features



Both the C6 and C7 installs have provided for the last couple of months the source and precompiled versions of an application called HNDBACKUPCONFIG.APP (for C6) and HNDBACKUPCONFIGC7.APP (for C7). Application interface below:

autobackupconfig01.jpg


There's a new button on the toolbar illustrated in the screen snapshot below, that automatically zips all .DCT and .APP files presently located in your auto-backup directory into a date/time stamped zip file. Click this button and several steps outlined below take place in a single pass.

autobackupconfig02.jpg


First, the new button automatically drops a filter into the query control as follows: NAME ENDSWITH .DCT OR NAME ENDSWITH .APP followed by another automatic push of the standard zip button. Then it performs a select-all to select ll files matching the file query inserted. Finally, a zip pass of all selected files is made.

hndbackupconfig03.jpg


When that zip process completes, there's a message informing how many files were zipped followed by a question asking whether to delete the source files just zipped. May as well say yes, since those files are now archived into a new date/time stamped zip file placed into your backup directory. Any time later, should you need to, you can re-locate that zip file with a date/time/name targeted query.

hndbackupconfig04.jpg


Finally the backup directory listing is refreshed, and a re-sortable listing of previously created zip containers is displayed. This functionality as described so far has existed for a couple of months prior to today's update.

How The .APP/.DCT Restore Features Work



First, use the query control to find a zip container in the date/time range by entering a query to delimit the list of zip containers (see example illustration below).

hndbackupconfig05.jpg


Once you have the date range narrowed down, right click any zip container to see the files inside. You do this by first selecting a single container, followed by a mouse right click. That opens the selected zip container and displays a searchable list of .APP and .DCT files inside the zip container as in the illustration below.

hndbackupconfig06.jpg


In the illustration that follows, we've entered "04-17" in the file query to delimit the list to applications and dictionaries to those from April 17. It's important to complete the "Restore Folder" field on this dialog if you haven't done so. This is the folder into which any restored applications and dictionaries are going to be placed.

Even if this were set by accident to your normal working app-development folder, there's no chance your present .APP and .DCT files will be overwritten since the file names of all restored files are unique due to the incorporated date stamp.

With the restore folder set, select one file, a range of files or specific files, using standard MS Windows record-marking keys (Click, Ctrl-Click, Shift-Click and so on) followed by a right click. A message then popus up reminding you how many files will be restored and into which directory they are going to be placed. Click YES and in an instant your files are back in standard .APP and .DCT format ready to be opened.

hndbackupconfig07.jpg


The idea, in principle, is to get one or more files restored into a working folder where you can open them and perhaps recover work removed or compare the prior version of an application with it's present version. Or, if you wish to recover a specific application, to open it with your Clarion IDE in the restore folder and performing a "Save As" to your working folder. The same steps could apply to a dictionary as well.

Bulk Field Import Feature Added To QueryParsingFilterControl



At the request of a subcriber (Drew Bourrut) we've added a bulk "hot" field import feature to QueryParsingFilterControl - see illustration.

qpfchotfields01.jpg


Many of you who use this control with ExplorerBrowse, HandyMarkerBrowse and LocatorOverRideControl probably don't even bother to complete this "hot" field dialog since it's not necessary to add fields which are already populated on browses created with those CHT browse extensions. This dialog is intended for situations where you want to query data view fields which do not appear in your browse, or to use QueryParsingFilterControl with raw ABC browses, Reports and Processes.

You've always been able to individually select fields and add friendly query names to them as well as to import fields from a fields list created by an instance of this template on another procedure. Here are some things you should know about how this works:

• Field friendly names are auto-assigned with the colon replaced by an underscore and upper cased so that REC:MyField becomes REC_MYFIELD as seen in CHT Query Builder.

• Field settings can be edited after import and even exported to be used elsewhere in your application.

• Group structure names are not imported. Fields inside these groups are imported.

• Only the date and time fields from an SQL date stamp are imported. The date string @s8 and the group OVER this string are skipped. These are not needed. The CHT query system figures out what to send to your SQL data base to make date queries work without you needing to think about these Clarion-induced complications.

In the past, we've always let you establish field order in this dialog in an order determined by you - so that the fields could appear in CHT Query Builder in your own order of priority. That still applies, but with this additional feature, we've added an optional "Sort Fields In CHT Query Builder?" switch (shown above) which causes your query field names to appear in CHT Query Builder in ascending alpha order - see illustration below.

chtquerybuilder01.jpg


Query Builder Column Width Adjustments Made



The feature explained above tends to produce fairly long friendly field names since they incorporate the prefix and an underscore. In this update we've made some adjustments to the standard column widths provided in the data "Column" area. While you could always - and still can - adjust the widths yourself, this change is
a convenience for CHT Query Builder users.

Data With Query Only And Opening Query - On CHT Browse Extensions



This functionality now works with all CHT browse extension templates: LocatorOverRideControl, ExplorerBrowse and HandyMarkerBrowse, regardless of whether - in the case of the latter two templates - your browse incorporates a QueryParsingFilterControl or not. Further, the Data With Query Only feature works independently of or in combination with the Opening Query feature.

Further still, the Opening Query can be entered in the form of a hard coded constant such as "CITY = LONDON" or as a variable like !MyQuery - with the leading exclamation point indicating that you've entered a variable. When using a variable just make sure it's initialized before the CHT template calls SELF.PostQuer(MyQyery) in the HBRWx.AutoInit()method that initializes our browse extension template.

datawithquery01.jpg


CHT Video Education Default Port Changed HTTP Port 80


In prior releases, this application was set to default to connection port 23. We've changed this to port 80 since port 23 is blocked in some corporate environments.

hndvideoeducation01.jpg


The video index is assembled by a CHT data server from a data table available to this server. The actual video is played from a rented, high-speed server. The video index looks like this:

hndvideoeducation02.jpg


Local Variable In First Column Of HandyMarkerBrowse


We fixed an issue found by one of our developers (Piotr Heidak) having to do with populating a local variable in the first browse column of a HanyMarkerBrowse-extended browse. On all other browse columns but the first, this worked correctly in the past, now it works as expected on all columns. We've inserted an example of this into one of the existing browse examples in HND3.APP - see screen shot below.

hndmarkerbrowse01.jpg


While on this topic let us point out a feature available on CHT browse extensions that lets you populate local variables to your browse and still have them sort with a header-click as if the local were a real data table variable. The trick is to use the Forced Sorts dialog on our template to insert a proxy data table variable
(or variables) to stand in for the local. When you do this, even in SQL tables, the query sent to the data base incorporates the proxy variable in the ORDER BY clause. In our example pictured above, we've created a local variable called CityState and by formula we've concatenated the back end values from the City and State fields. Then on the Forced Sorts dialog we've configured as in the screen snapshot below with a primary sort on PEO:City and a subsort on PEO:State.

forcedsorts01.jpg


New, Powerful Features In CHT Installation Tuner


In a previous update last month, we announced that all C7 containers have been re-organized with C7 specific subdirectories incorporated. With that change, CHT Installation Tuner was reworked to work exactly like the C6 version, fully able
to restore all CHT installation files to their installation state and to report any that have changed, are missing or have been touched.

In this update we've added two right-click features that provide installation fine-tuning features. With a right click on the CHT Installation Tuner browse - the installation index - you can perform two new functionalities: Open Selected
Object's HZO Container
and Extract Selected Object(s) To Installation Folders.

hndzindex00.jpg


• The first menu item opens the selected object's installation container. CHT Installation Containerizer is then started to open the .HZO container in which that installation object is stored. Installation containers are named in the HZOName column to the right of the object Name column. This menu item requires you to select only One item from the index, since two adjacent index items may be located in different containers.

• The second menu item permits single or multi-select on the index. It can be used to restore specific items from the installation container to the installation directory - i.e. the folder to which that item would normally install
depending on which Clarion version is in use.


Cheers...

Gus Creces
The Clarion Handy Tools Page
www.cwhandy.com
support@cwhandy.com
May 1, 2009

Sunday, April 5, 2009

Small Upated Posted to Build 13B1.00 April 4, 2009

We've posted a small update to Build 13B1.00 last night, April 4, 2009. This update is part of an ongoing series of changes and additions to our 13B1.xx, 2nd quarter CHT build.

New CHT Templates


In this update we've added three new templates called: Source_EmbedMAPIFunctions, Source_EmbedZipFunctions and Source_WriteZipCode_SEZF.

These three templates are a continuation of our Templates For ABC Source Procedures initiative discussed in our April 1, 2009 entry posted below on this page. The purpose of this set of templates - all template names starting with "Source_" - is to accommodate the ABC source code procedure which is missing most standard embed points and so is not a very flexible target for template-placed embed code.

New CHT Applications


With this update we've added two new demo applications called: HNDSOURCESMTPDEMO.APP and HNDSOUCEMAPIDEMO.APP.

The purpose of these small demo apps is to illustrate the suite of "Source_" templates which at this point includes eight new templates. More demo apps of this sort will appear during this quarter to illustrate all "Source_" templates available so far. I also have several new "Source_" templates in mind for this quarter and they
too will eventually get separate demos or they will be incorporated into the existing demos.

PopUp Menu Demo Jazzed Up


We spent a few minutes "jazzing" up
HNDPOPUPMENUDEMO.APP
mentioned in our April 1, 2009 entry and have added menu-based calls to also raise the popups embedded under the window buttons by our template. That application now looks as follows:

hndpopupmenudemo_2.bmp


C7 News


We've been slowly adding to our suite of C7 demo applications. Eventually we want all but a couple of CHT demo and utility applications to be available in both C6 and C7 format. We've dragged our feet on a few of these while waiting for a C7 bug fix (a PTSS Item I posted) that seems to be taking its time. It's not a serious
bug but an irritating one since we tend, in C6, to often use an equate, HPROP:AppVersionEx, in the title bar of our windows. C6 doesn't have a problem with this. But apps that contain anything but text in the window title are a problem for C7 during the conversion process. C7 reports Constants and Variables used in your window title bar as errors, so that after conversion, you need to go to the window and edit the title bar back to text.

Long-time CHT user, Robert Barton, alerted us yesterday that when CHT was registered in C7 he was unable to import from another application without encountering a UHE. It appears that when C7 initializes the the template registry in preparation for import, it runs the #SYSTEM code in our template. Since this has always worked just fine in C6 we had to write a workaround to accommodate C7. So as of this update you're able to import from other C7 applications without encountering any problem. We'll raise a C7 bug report to PTSS to explain what causes the UHE and request a fix.

Just a reminder once again, when you do a C7 update, don't forget to run one or the other of our C7 installers to bring our classes and templates up to date after the C7 re-installation.

That's all for now.

Cheers...

Gus Creces
The Clarion Handy Tools Page
www.cwhandy.com
support@cwhandy.com
April 4, 2009

New Build Released 13B1.00 April 1, 2009

As of April 1, 2009 now you're able to download the latest build numbered 13B1.00.

New Templates In Build 13B1.00


More Support For ABC Source Code Procedure Template

We've made it easier to add some of CHT's low-level classes to your procedures built with the ABC source procedure template. In this build, we've added the following templates: Source_EmbedDateFunctions,Source_EmbedDiskFunctions, Source_EmbedUtilityFunctions, Source_EmbedEncryptionFunctions.

ABC source procedures don't have the normal range of embed points provided in ABC window-based procedures, so in order to attach classes in which derivation is automated the way it is in all other ABC procedures, a special template
is required. These four templates provide that special design. You're able to see the class functions inside the procedure and you are able to embed code inside these methods the same way you can in a Window, Browse, Report and Process template. All four are extension templates so they're added to your source procedure via the IDE extensions interface.
source_templates.gif


Soon we'll give you at least one example application using these templates to illustrate what you can do with them.

New Pop-Up Menu Template

This build, we've given you a Pop-Up menu template called HandyPopUpMenuButton. With this template you're able to easily build pop up menus which include images. The template provides a button control which is used to trigger the pop up menu. Clever developers know that they really don't need to display this button to make it work for them. By simply hiding the button, and posting EVENT:Accepted to it from any other control or from an embed in your procedure, the pop up menu can be made to do what you've set it up to do.

handypopupmenu2.gif

handypopupmenu1.gif


For an example application illustrating HandyPopUpMenuButton look at HandyPopUpMenuDemo.

Windows Services Template Revised

We've revised the HandyNTServiceFunctions template with a switch which when checked, makes the window service "silent" whenever it is installed or removed. In the previous version of this template, the service displayed messages when it was first installed and when it was removed. While displaying messages is still the default mode of operation, now you can suppress the messages if you choose to (see image).

handyntservicefunctions.gif


Look at application HndWindowsServiceDemo.APP for an example illustrating use of this template. While we were at it we also fleshed out this functionality in-code by adding two commands /ISQ (install service quietly) and /RSQ (remove service quietly). The image that follows is from the service application's interface. We use this application set for 3:30 AM daily, to back up our tool kit source code by having it start HNDFSYNC.APP, passing it a sync control file called hndfsync_driveo.tps.

hndwindowservicedemonew.gif


For a full review of new and revised templates so far in 2009, follow this link: New/Revised Templates YTD 2009.

Cheers...

Gus Creces
The Clarion Handy Tools Page
www.cwhandy.com
support@cwhandy.com
April 1, 2009