Heard it through the Bit-vine... - Notes and News about the products you use

by Tom Hebenstreit, Review Editor

Published 1999-02-01    Printer-friendly version

Well, well, well. Here we are a month into the new year, and what a month it's been...

C5 Import Blues

Aargh. And that's being polite!

I've been wrestling with trying to import a file from a client's older CW 2.0 Dictionary file into a C5EE Dictionary so that I could write a new utility program for them.

My mission: To import a single file definition from one dictionary into another. Doesn't sound too tough, now does it? It wasn't in C4, etc. Just choose the option, choose the dictionary, pick the file and voila. Well, we are in the brave new world of C5 now, boys and girls...

Started 'Multi-file Import'. Why? Well, I don't have an actual database file, just the DCT file, so the 'Import File' option is out. In any case, 'Multi-file Import' fires up a wizard. I choose the Dictionary and file, then press Finish. After a LONG wait, up comes the Dictionary Synchronizer and... can't press OK to import the file because it doesn't like some of the other files in the dictionary I am importing into. WHAT!?!? Who cares about those files? I just want to import one NEW file!! Press the button to take you to the first problem. *CRASH* C5 dies a grisly death. Start the whole process over. Finally get back to the Synchronizer (DON'T PRESS THAT BUTTON). Ok, so now I'll try and just tell it to ignore the things it doesn't like about the files that are already in my dictionary and which are working just fine in apps, thank you very much. I manually scroll to the first problem - it doesn't like the validation range on a field. I tell it to ignore the file - it ignores me. I tell it to ignore the field - it ignores me. I tell it to ignore the ranges - IT WORKS! Keep in mind, I shouldn't even be having to mess with this in the first place. Take a deep breath. Proceed to the second file. Ignore, ignore, ignore. I'm telling it to ignore the problems and it is ignoring my attempts to tell it to ignore. Try a few more times and then *CRASH*, down goes C5 (I kind of enjoy it by now - "DIE, SPAWN OF EVIL!!").

Ok, I think, I'll try something completely different... maybe Data Modeller will help me out. Fire it up, load this big old dictionary into it after exporting to a TXD. Look at the Tools and hey, there's an option for 'Create empty file'. Cool! I'll just create the file and import it directly into the dictionary.

Uh-uh. Tried that option and *CRASH*, up pops the old Norton Crash Guard. Down went everything after a few messages about invalid TXD or TXR(?) files. After taking a closer look, I could see that DM didn't even import the TXD file right (lopped off a bunch of fields from the end of the file - and yes, the fields were in the TXD). Groan... back to the Synchronizer. Let's do some cleanup first, though.

What were the problems in the files? In the first, 'Must be in numeric range' was selected, but the ranges were both zeros. Not exactly a show stopper, in my opinion, but I changed it to no validation. In the second case, the file had an Index that the Synchronizer insisted had the unique attribute turned on. Did it? Nope. Curiously, though, just going to the key in the dictionary and verifying that it wasn't seems to have fixed that problem.

Ok, started again with my squeaky clean dictionary. Click, click, wait, wait, finally back to the Synchronizer screen.

One final 'error' in the file I wanted to import. It had a field named 'Class' which the synchronizer regards as a syntax error. At least telling it to ignore that 'problem' worked, although it took a few tries to figure out where to tell it to ignore. For example, it was flagged at the lowest level under 'Field Name' (one of many Field properties). To get it un-flagged, though, required telling it to ignore two levels up the tree, at the 'Field' level.

Gloriosky!! The OK button is accessible! With great relief I click on it and wait... and wait... and wait... hmmm, can I do something else while I wait? Nope, C5 has the machine utterly tied up. So I wait some more and what do I see? Up pops up a cute little message telling me "Cannot create dictionary from text file. ) expected".

So I press the "Just kill me now" button (otherwise known as the OK button) on the message, Synchronizer goes away, and I am returned to the dictionary editor. One itsy, bitsy, teensie, weensie problem here, though. ALL MY FILES ARE GONE!! I'm looking at an empty dictionary (I thought I pressed 'import', not obliterate!). Are we done yet? What do you think?

Press the 'Close' button on the Dictionary, fully intending to say no, no, a thousand times NO to the save your changes prompt, but... it doesn't come up. The Dictionary Editor simply closes and saves the empty dictionary. Over my existing one. Stick a fork in me, cause I'm done now!

All I can say is that I am really, REALLY glad Clarion creates backup dictionary (BCT) files. Deleting the empty DCT and renaming the backup at least got me back to where I started, oh so long ago.

Ok, time for a bit of detective work. What caused the import error that wiped out my dictionary? Time to look in the temporary TXD file created by the Synchronizer that was being imported back to recreate the dictionary. (It will be the newest TXD in your working directory, and will have a name starting with TEMP.)

Got it - the problem was the name attribute for a file. In wanting to browse a file earlier, I had stuck a '!' in front of an actual path in the file properties so that it looked like this: "!/hmprog/data". I had forgotten to remove the exclamation, so it was trying to interpret the path as a variable name - a variable name that contained invalid characters. Right. This one was my fault, so fixed that, whole thing works and the file definition was finally imported. Mind you, the file in question didn't have anything to do with the file I was trying to import, but at least I had a dictionary now. BUT... do you think we are done yet? Bwa-ha-ha-ha-ha-ha!!!

Remember where I used the synchronizer 'ignore' option for the field named 'Class'? Well, I found out that it means really ignore it, because it dropped the 'class' field entirely from the file definition. Yup - the upshot was that the imported file definition didn't match the Client's actual file, so here come the Error 47 Invalid record declarations. I'll just add the field manually, I think. Uh, oh. The IDE refused to let me add it ('illegal name' errors).

So did I ever succeed? Hah! Who's smarter, me or this program? (Ok, ok, that's a debate we'll save for another Bit-vine!)

I finally ended up asking the client to send me a copy of the dang file and just used the 'import file' option. It took one minute. It didn't gripe about the 'Class' field. Program finished and delivered.

Let's see. When TopSpeed talked about 10x increases, I didn't think they were talking about the time it took to do something that was trivial in C4. Ah, well. A day in the life of an Angry Programmer...

Uhhh, it's 1999 guys

Well, as long as I'm griping about the TopSpeed IDE, maybe I'll just take this opportunity to air another pet peeve of mine...

Why, oh why, in 1999, the year of Pentium III, Xeon, AMD K6-3 and K-7 processors, does the stupid TopSpeed IDE still default to 'optimizing' for the blasted brain-dead and long forgotten 80286 CPU? Does anyone even use one of those things anymore, much less use it for running Windows? Think about it -- How many fancy Clarion programs do you think are out there with that setting, either because the author forgot to set it initially, or (and this is the worst part), because the IDE seems to reset back it to 286 every time you edit the project.

I first asked about this three years ago at a DevCon Q and A session, and still haven't gotten a good response (or, even better, a change!). C'mon guys, would it take more than a minute just to change the dang default setting to Pentium?

Grrrrrrrrrrr.

Undoing a C5 dictionary conversion

Have you accidentally opened a C4 dictionary in C5 yet? You will... and you'll find out that C5 has silently and automatically converted it so that C4 will no longer read it. Exporting it as a TXD from C5 and trying to import that into C4 doesn't work, either. Can you say "Eeeeeeek!!"?

This happened to me recently (can you tell this has been a good month for me?), but I did manage to resolve it by doing the following:

  1. Export the dictionary to a TXD from the C5 Dictionary editor (it's the 'Export Text' option on the File menu.)
  2. Open the TXD file in the source code/text editor. Choose Search, then Replace from the menu.
  3. In the 'Find What' field, place ",USAGE(File)" (without the quotes). Note the leading comma.
  4. Make sure the 'Replace With' field is blank, then press the 'Replace all' button.
  5. Save the TXD file, then rename the original, converted DCT file to something else. In C4, now create a new dictionary, and then import your modified TXD file using the 'Import Text' option on the File menu. You should now have your dictionary back in C4.

The key is that C5 adds that 'Usage(File)' designator to each definition, since with C5 you can also have Global variables and/or a Field Pool in your dictionary along with your files. This new C5 attribute is the one that chokes the C4 TXD import routine, since it has no idea what 'usage' means. By removing it, C4 can import the TXD file.

Note that this technique will only work on a dictionary that has merely been converted. If you have been actually working in the dictionary in C5 (adding globals, a field pool, deriving fields from others, etc.), you'll have a lot more editing to do before the file will be acceptable to C4.

I really would like to suggest to TopSpeed that they offer you the choice to convert before embarking on these one way app and dictionary conversion journeys.

And now for something completely different...

Ok, enough of the kvetching and whining!

Been working with the beta of compression specialists Linder Software's new SFX Toolkit, and this puppy is going to be great! What does it do?

When used in conjunction with their LSPack compression libraries, it lets you create an installation package from directly within your program. For example, a client had a need to distribute file updates to reps at remote locations. We created an extract program, which takes data from the main files and reformats it for the remote programs to use. We had been using Linder's LSZip libraries within the extract program to package the files, but that still left us with needing the remote workers to a) have WinZip or a similar program properly installed and configured, and b) have the skill to extract the files from the ZIP into the proper locations on their hard drives. For some of these people, that's asking for a whole lot more effort than they want to put out.

Enter the SFX Toolkit. I converted the extract program so that it created LSP files instead of Zip files. (LSP files are a proprietary Linder format used by their LSPack compression libraries.) Using exactly two (count 'em, two) SFX toolkit functions, I could now convert the archive file into a smart, self-extracting installer. It displays my welcome message, confirms the install location (which the developer can either force, suggest or let the user choose), and then extracts and places the files in the proper locations.

Way cool, and I can think of dozens of uses for it when it comes to distributing information via web sites, email or whatever. Future plans also include creating a version for the LSZip package as well.

Gasp! Two Clarion Magazines!

Dave Harms, well known author and Team TopSpeed member has announced Clarion Magazine, a web based zine to be located at http://www.clarionmag.com. Check there for information on his premier issue, subscription costs, etc.

This means that, for the first time ever, the Clarion community will have not one magazine but two -- and in my opinion, that's a good thing! With what appears to be an expanding market, TopSpeed may just be poised to finally achieve a higher profile in world of Windows development systems, and having multiple sources of information helps to demonstrate that the platform is not only viable, but thriving. After all, how many VB mags are there (both print and electronic)?

Some people have asked me if the Clarion community will support two (or even one) magazine. I have to say that I can only believe that smart developers will recognize the value of having multiple sources of information, articles and viewpoints, and that the cost of subscriptions is really quite small for the value received.

Other news

Here are some tidbits and announcements gleaned from the TopSpeed forum and elsewhere over the last couple of weeks. If you see any products here that you would like to see scheduled for a full review in Clarion Online, let us know!

  • BoxSoft Development has announced free updates to the ABC versions of their Super Browse, Super Invoice and Super Dialer templates. New features have been added to all of them, and the updates and more information can be found at: http://boxsoftdevelopment.com. (Look for the review of Super Invoice in this issue of Clarion Online. Super Dialer was reviewed in the January issue.)
  • Gitano Software announced updates to their G-Calc pop up calculator product and a new Calendar product called, amazingly enough, G-Cal. It includes 5 pop up calendars, and should have the great look of all Gitano's products. Gitano also is planning other new products that will expand on G-Cal, as well as a Security/Password package. For more info on these and other upcoming products, go to http://bizweb.lightspeed.net/~gitano
  • From Arnor Baldvinsson: "Icetips Knowledgebase version 1.52 has been activated. Besides article updates, I have added a sort order option, so articles can now be viewed in subject order, alphabetical author name order and ascending and descending date order. Check it out at http://www.icetips.com"
  • From Robert Rodgers: Not exactly Clarion news, but an interesting site nonetheless - The Interface Hall of Shame. It 'features' examples of what the authors believe to be bad user interface design, along with rather humorous comments on them. Check it out: http://www.iarchitect.com/mshame.htm
  • From Jim Katz, author of the ABC DLL Toolkit: a new feature has been added which allows the user to "be able to create standalone EXE's or DLL's that contained internal support for files, but did not export these files, and used a global ABC support library (DLL).". The update can be downloaded at: http://www.iag.net/~jimkatz/
  • From Sean Wilson: "L3 Technologies is pleased to announce that the dBASE File Driver for Clarion for Windows has now been released. The dBASE File Driver will continue to be offered at the discounted price (20% off the normal price of 155 GBP) until the end of January 1999. The dBASE File Driver and the Paradox File Driver will be bundled together for the purpose of distribution, though they will be licensed separately." Full details and freely downloadable evaluation versions are available from their web site at: http://www.l3.u-net.com
  • Bruce Johnson of Capesoft posted the following: "CapeSoft is pleased to announce the release of Version 2 beta of EzHelp. This update is free to all registered users of EzHelp and can be downloaded from http://www.capesoft.com". The update includes both new features and bug fixes.
  • From Mike McGloughlin of Sterling Data: "IMPEX 3.0 (ABC Compatible) is now available. The IMPEX templates are the easy way to allow your users to run import and export operations. Simple drag/drop interface with (NEW) ability to override any field with static text. Works with all versions of Clarion from CW2002 to C4/C5, ABC and Legacy, 16 and 32 bit". More info and a new fully working demo is available at http://www.sterlingdata.com
  • From the inimitable Lee White: "Cowboy Computing Solutions announces the availability of the CCS SQL templates for C5/ABC. The beta version of the template set is now available for immediate purchase and download. Purchase your upgrade BEFORE 20-Feb-1999 and save $200.00us. Wait until AFTER 20-Feb-1999 and you'll have to pay the full, new purchase, price of $399.00us so DON'T DELAY!" The beta and more info can be downloaded found at http://www.CWaddons.com. You can also contact Andy 'Cowboy' Stapleton for more information at: ccscowboy@csi.com

Can't beat that price...

One of the really nice things about using Clarion is the overall generosity of the user community. (Go ahead, all of you give yourselves a pat on the back!) Often, this manifests itself in truly useful templates or tools that the authors have made available to the rest of us for that most favorite of prices: FREE! Each month, this column features a handy free template or tool that you might want to add to your bag of Clarion tricks.

Note: If you decide to download and try out any free items mentioned here, please remember that you get what you pay for - don't expect support from the author like you would from a commercial product. While most of them are generous to a fault (as witnessed by their giving away the template), they are NOT obligated in any way, shape or form to you because you want to use the template. Be nice to them!

This month's jewel is:

NiceTouch Solutions Embed Assistant

Here's how NiceTouch describes it:

"Embed Assistant (EA) allows for the documentation and analysis of embedded application code. Through a template utility, EA imports filled embed text from your application into a TopSpeed database. The database may be searched and printed using EA's text searching functionality, complete with wildcard support."

Why are they giving it away?

"To inaugurate our first newsletter and to say thanks to Clarion developer community we are offering the Embed Assistant as a free download. Point your browsers to the NTS Clarion product page http://www.nicetouch.com/clarion and follow the Embed Assistant link."

Don't forget to say 'Thank you!'.

Next month: Who knows? You'll just have to come back and find out!

About the Bit-vine

Each month, this column will provide you with the latest in Clarion news, tips, rumors, freebies and basically anything else that seems interesting about the going's on in the Clarion world.

So, who determines what's most interesting? YOU DO!!

Are you a vendor? Let me know about new releases, updates, betas, product plans or anything else you think Clarion Online readers might want to know about.

Are you a user (and who isn't)? Drop me a line about any cool nuggets of information you come across, free templates or examples worth sharing, or anything else that other readers might find useful.

What do you get for contributing? Well, you'll see your name up in lights (phosphor, to be accurate) here in the Bit-vine credits. For especially useful bits, you may even win an autographed GIF of an official Clarion Online shirt or other similarly valuable prize. Come on, how can you resist?

Let me hear from you! The magic address is TomH@ClarionOnline.com

The disclaimer

Everything in this column is the sole opinion of me, the author, and does not necessarily reflect the views of this magazine, its publisher, or even of myself (hey, I can change my mind, too!). Don't bet the farm on anything you read here: consider it a starting point for your own inquiries and research. The point here is that this column is intended to both enlighten and entertain, and that in the fast-moving world of software development this month's truth (or product release date) is often next month's "oops, did I say that...?".

'Nuff said!

Printer-friendly version

Reader Comments

To add a comment to this article you must log in.

 
 

Search

 

Advanced Search
Topical Index

Related Articles

Subscribe to
ClarionMag

One year: $169

(includes all back issues since '99)

Renewals from $119

Two years: $269

Renewals from $219

More Info

Subscribe Now!

ClarionMag Blog

RSS Feeds

Updates via Email

Enter your Email


Powered by FeedBlitz

Quick Links