![]() |
|
Published 1997-10-01 Printer-friendly version
We talk of summer days lazing in the sun-- popcorn at movies that cost a buck. We talk of simpler times, of when life was easy, and those of us who are bald and gray remember the simpler times of word processing. Recently it seems there is a contest among the big three to make their word processor the most feature-rich and hardest to use.
As a developer of applications designed to make life easier for my clients, I've been faced with a dilemma. How do I give my clients the word processing capabilities they need within my applications? There are two approaches. The first provides a way to link data from my app (perhaps via DDE) to one of the brand name word processors. The second would be to build the word processing functionality directly into my app. This is where RichX comes in.
RichX is from X-Generation Software L. L. C. and, to quote from the RichX help file, "RichX was created to provide two primary functional solutions: First, it was created to perform as a scaled-down stand-alone embedded word processor, alleviating the need to integrate a costly and resource-intense full-blown commercial word processor in your applications. Second it was created to provide formatted memo support via BLOB (Binary Large Objects) and STREAM (streaming data) data storage techniques."
In this review I'll look at the implementation of RichX into an app. I'll examine how I successfully built an app incorporating RichX. Then I'll look at the steps you can take to use RichX in your own apps. But first a word from my grandmother. She always said, "If you can't say something nice then don't saying anything at all." Fortunately, there are many nice things to say about RichX.
I decided to take one of the CW example apps and add word processing to it. The application I chose was MAILLIST. This application incorporates a simple list of customers with label printing capabilities. When I was finished, it also had a word processor.
Here's what I did first
I began by first opening the sample app (ocxdata.app) that comes with RichX. In it, I found that there was a procedure called "MergeDocTpl" that has a window with basic word processing functionality. Then I closed up the sample app, made a new directory called maillist, copied everything from the maillist directory into it, and opened the maillist app.
I then chose File/Import from the Application menu item. I named ocxdata as the app and when it asked for the name of the dictionary to use I entered "MAILLIST.DCT." I then selected the MergeDocTpl procedure and let it be imported. Now I was ready to incorporate the procedure.
The main file used by maillist is people. So I opened the browsepeople procedure and added a button that I labeled "Word Processing" to the browse. To the actions tab of button's properties I indicated that I wanted to call a procedure named "MergeDocTpl." I then closed up the procedure, saved my work and pressed the famed blue cloud.
The app compiled flawlessly and, when the dust had settled and the app was running, I opened the people browse, pressed the word processing button and here is what I saw.

You can see many of the word processing features that are possible including: fonts, sizes, bolding, italics, underline; justification - left, center, or right - and bullets. Other features are not obvious here. Headers and footers, mail merge (more on this later), and object insertion (yes you can put an Excel chart into your document).
For Clarion for Windows users RichX is two products in one. It is a template set and an OCX. The template set helps you implement the OCX. Here's what the CW User's Guide says on page 352, "Using an OCX usually requires a lot of embedded source code or hand code. However, many OCXs are distributable to end users with no additional license fee, and most OCXs require considerably fewer resources than do typical OLE Servers."
What is an OCX? It is an OLE Custom Control that you link to, and embed in, your application. Another way of saying this is to say that OCXs are Microsoft Windows' DLLs that make available objects with properties, methods and events instead of just abstract functions or message interfaces. An OCX is an OOP binary object and RichX is therefore an OOP binary object that provides you with a way to put a word processor into the middle of your application.
So, you can see that you might want to use RichX but if you're like me you're not quite sure you'd be able to understand all of the source code required to make it work. That's where the templates come in. They implement virtually all the RichX features without having to write a lot of code. Zowie!
My first test app gave me a beginning point for examining RichX but I was far from done. Now that I had seen that I could create documents from within my app I wanted to explore "formatted memo support via BLOB (Binary Large Objects) and STREAM (streaming data) data storage techniques." Now let me 'fess up.' I really wasn't sure what all the implications of BLOBs were and I sure as heck didn't know what STREAM had to do with word processing. So, I decided to take a look at the RichX help file. It really didn't tell me much (more on this later). I then looked at the Clarion manuals, at various old notes, and finally at a batch of saved messages from the CompuServe forum.
Binary Large Objects. According to the Clarion Users Guide BLOBs are variable in length, may be over 64K bytes in size, and are currently only available for the Topspeed file driver. Well, okay, but what's it all mean?
Suppose I have a Topspeed (TPS) data file with a field where I want to make notes. I can define that field as a blob. Once I've done this, it's quite easy to implement the use of this feature into my app. For this example I opened the maillist dictionary and added a file called PEONOTES. For this file I created the following fields: ID, Date, Topic, Note. The note field I described as a blob. Then I opened the app, added a button on the People form for notes that calls a browse that then calls a form. The browse simply lists the notes for a specific person. For the form I placed the Date and Topic fields. Then I selected control template and chose (under RichX) Ole Control - RichX ActiveX Control. I pointed to the form, left-mouse clicked and then sized the Ole area. I then right-mouse clicked on the Ole area and selected "Actions..." I then only needed to add a unique name to the prompt "MenuPersistenceName." I chose 'NoteBlob' as the name. Now, since I was working with a blob, I left-mouse clicked on the "Blobing" tab where I entered the file name and the blob field name. That was it.
I compiled the app with no errors and here is what I saw.

The next thing I did was redefine my PEONOTES file so that the Note was defined as a memo field instead of a blob. Now I changed my app, deleted the file and field information under the Blobing tab and placed the information on the Streaming tab. I then recompiled the app and now it worked with memo data.
Finally, there is the issue of what to do with the blob or memo data. There is a print icon and you can certainly print it directly, but it can also be used in a report. When laying out a report you can select Populate / Control template and then choose the RichX Box - RichX Report Display. This will allow the data in the note to be printed in your report.
What has fascinated me during my use of the RichX product was that, unlike the '50s movie, the blob didn't get me. That is, I really expected this to be hard and it wasn't. OCXs are not easy (my opinion). There's usually much code to be written and X-Generation Software has produced a simple way of implementing word processing directly into your application. It's not perfect (see Room for Improvement) but, and this is really important to me, it works as advertised.
Soapbox On > These days I find that many products almost work as advertised. I'm one of the people who attempted to use HighEdit in the past. I was never particularly successful in implementing it and while I jumped at the opportunity to review this product, I approached it with more than a modicum of skepticism. < Soapbox Off.
If you want to implement the full-function word processing features as I did in my first attempt, I suggest you copy the "MergeDocTpl" procedure from the sample app into your own app. X-Generation has chosen to allow you add each and every feature individually to your app, but it's hard to know what to add. For example, can you state what functions are typically on word processor File menus, or which are on the Edit menu? The MergeDocTpl procedure does it all for you.
I know I told you about my grandmother but I never said I took all of her advice. There are areas that need improvement. These are detailed below.
Installation should be easy and uneventful but I was immediately presented with a dilemma. The install program allows you to optionally install components:
Each had a check mark except the last indicating that I might not want to install it. But since this was the first install I assumed (bad assumption) that I should install the support dlls so I checked the box. Once installed, a Quickstart.TXT file informed me that it was suggesting that I not initially install the Support DLLs. The Quickstart file should be available prior to installation.
It is critical to have a list of files that must be included with a distributed app. There should be a list for Win 3.11, Win95-32bit and Win95-16bit. Additionally, it is important that there be an indication of what OCX/DLL needs to be registered with which program on the user's machine.
The help file seems accurate and to the point but the only documentation is the help file. Like most help files it's hard to get the big picture. It would be helpful if the help file were available as an RTF file so it could be printed in its entirety.
I suspect that if you've worked with OCXs several times in the past, you'll have no trouble and you'll find the documentation adequate. But for the novice there should be topics like: Creating your first app; when to use Blob support and when to use Stream support; and features you can add to a word processing screen. In addition, while the sample app is excellent it could do with some comments.
Headers and Footers
Currently, RichX has headers and footers for a document or it doesn't. It would be nice to be able to selectively turn them on or off, and to have multiple headers and footers;e.g., headers and footers on the first page to mimic a letterhead layout and then a header on the second page that contains the page number. Also, It is currently not possible to do page numbering within a RichX document.
Reports
Currently your blob or memo must fit on one page. It would be nice if a multi-page capability was built in to the RichX Report Display so that one could use it with longer memos and blobs.
Multi-record Merge and Spell Check Built In
Currently merge works with one record. This is great for sending a personal letter to one contact but it would be nice if multi-record merge were built-in. Spell checking is the other issue. If you type like I do, you need it. Fortunately, both features are available from other third parties but this adds substantially to the cost and leaves you dependent on others updating their product in conjunction with future updates of RichX.
From a programmer's perspective, the product is solid and from a user's perspective the resulting app feels good. Once you have your first app under your belt you should feel confident using Rich-X. Also, when you do need help, tech support via CompuServe has been quite responsive. The X-Generation team has a good product and it will be interesting to watch the product mature.
| Category |
Product Score |
| Ability to do the task |
Very Good |
| Ease of use |
Very Good |
| Ease of Installation |
Good |
| Documentation |
Good |
| Technical Support |
Excellent |
| Modifies Shipping Templates |
No |
| Black-Box DLLs/LIBs |
Yes |
| Review comments from Ross Santos, Executive V.P. of X-Gen |
|
The way in which the RichX class was written allows you to simply drop on the RichX OLE control template and never worry about whether you are compiling for 16 or 32bit, the class handles the instantiation of the correct control based upon the current project settings. This is a feature that most folks miss because it all seems so simple -it is a powerful and useful feature that OCX developers that supply templates should employ. In regards to "Room for Improvements" suggestions from the review author: Installation of DLL filesWe chose not to check the support Dlls primarily because we found that our users were installing Dlls on the wrong platform (thus why we now have 4 different installation programs). There is no harm in installing RichX without the support DLLs, worst case is the developer must install them manually from the zip files that are automatically installed from our installation program and that are documented in the help file. File Distribution ListsIn the help file it is very specific as to what should/should not be installed. The largest problem we face is that our target market includes: Win3.11, Win95a, Win95b, WinNT 3.51 and WinNT 4.0. To add to that confusing problem you must consider that some folks are running IE3.0x and some are running IE4.0 beta versions. Every platform requires a different set of DLLs (I think you can appreciate the problem). We attempted to assist the Clarion developer by installing OLE2 and MFC Dlls for him/her but this has proven to be more trouble due to the above situations. We are considering what can and should be done about this problem and will have a solution soon in a new and improved installation program. DocumentationDocumentation is an expensive proposition. We are doing what every other small component developer does - ship only with a help file. We do provide the help RTF file on request. Features - Headers and FootersHeaders and Footers were added late in the development cycle of the initial release of RichX. We could not afford to let the initial shipping date slip, therefore we believed that having some sort of Header/Footer support was better than none at all. In a future release (most likely before the end of the year), page numbering support will be available through print events in the OCX callback procedure. Features - ReportsIt may not be obvious, but when using the RichX Box template, we are actually printing to the Clarion report structure via the Clarion report engine, not RichX's built-in print methods. The Clarion report engine (as those who write the reporting templates can assure you) does not provide direct printing access via an hDC. Therefore, we are wriggling RTF text into the Clarion report engine as best as can be done at this time. This is not a RichX limitation, it is a limitation in the Clarion report engine itself. Of course, RichX prints RTF from itself as it should, but we are limited in what we can do in the Clarion report engine at this time. Features - Multi-record merge and spell checkYes, its true, we chose not to add multi-record merging into the RichX templates. But, we did that for good reason. We asked the Clarion community how they were doing merging and found that most answered "J&S Software Merge Templates". So we contacted Jeff Slarve at J&S and asked if he would support RichX directly. The result is that the same templates from J&S are now available supporting both basic text and RichX merging. Likewise, we debated about integrating a spellchecker, the cost was prohibitive for us and ultimately the Clarion community. We would have had to pass that cost along to our customers, and that seemed unreasonable, especially for those who had already purchased one. So again, we went to the Clarion community and found that most were using VisualSpeller along with Mike Pickus' templates. So we contacted Mike and the result is that his templates now support RichX as well. I think there is an underlying idea here that we all need to appreciate. That is, while we could have provided everything you might ever need in the RichX controls and templates, in order to provide that functionality would mean that we would have skimp on something somewhere. We feel that since there is technology already created which provides excellent solutions, that we would be doing a dis-service to the community if we released a "not so complete" implementation of either RichX, the templates or the spellchecker. Therefore, keeping with the spirit of component architecture, we chose the direction we did - to provide a complete solution that could only be provided by the sume of the pieces, leveraging existing products and tools. As to compatibility, both Jeff and Mike are alpha testers as well as friends of X-Generation, they both receive updates as soon as we have them and that gives them plenty of time to prepare for any changes that might affect the use of their products with RichX. |
Copyright © 1999-2009 by CoveComm Inc. All Rights Reserved. Reproduction in any form without the express written consent of CoveComm Inc., except as described in the subscription agreement, is prohibited.
Clarion Magazine ISSN 1718-9942
One year: $169
(includes all back issues since '99)
Renewals from $119
Two years: $269
Renewals from $219