Handling Inmagic Textworks javascript errors

by Peter Tyrrell Tuesday, May 15, 2007 2:40 PM

The scripting environment within Inmagic DB/Textworks (or CS/Textworks) is extremely primitive. Controls you want to interact with have to be declared in an environment separate from the form designer and it's hard to write code longer than 100 lines because there's no tab character or ctrl-a select all, let alone syntax highlighting or intellisense. It's very easy to lose your way if your script does anything beyond "hello world."

The most difficult thing to deal with is that any javascript error encountered does not actually throw an error. Things just progress... until they don't. No error thrown, no feedback, no nothing. It makes debugging a nightmare. What I have done until recently is insert a million-and-one trace statements that write to a trace box over on the side of the form, which at least tells me how far progress went and gives me a clue as to the general area things went wrong.

But I've recently realized I *can* throw (and handle) an error, if I wrap logical blocks of code in try/catch/finally statements. Can't believe it took me so long to cotton on to this. Now I can get detailed info about unanticipated exceptions as well as the anticipated ones. It makes my life better until I can boot up Visual Studio and bask once again in its warm developer-friendly glow.

Play "spot da error":

Yeah, "rs" is an undeclared variable. That's what happens when you refactor manually. Without try/catch this little problem becomes extremely elusive.

UPDATE: The picture has syntax highlighting because I do all scripting in UltraEdit. (Also features code folding, a jump-to-function list, etc.)

Textbase help won't launch on Vista

by Peter Tyrrell Friday, April 13, 2007 9:43 AM

Whether you are using Inmagic CS/TextWorks (v.9 or less) or Inmagic DB/TextWorks (v.10 or less) on Vista, you will see something like the following error message when you try to use Help.

Why is that? Well, it's a long story* but the gist of it is, the help file was created in a format that is not, by default, supported by Windows Vista.

Fortunately, you *can* go and download the software which will let Vista use these older-style help files. (Anything that has the *.hlp filename extension.)

Get WinHlp32.exe for Windows Vista: http://go.microsoft.com/fwlink/?LinkID=82148.

* Okay, fine, here's the long story (taken verbatim from Microsoft site): "Windows Help (WinHlp32.exe) is a Help program that has been included with Microsoft Windows versions starting with the Microsoft Windows 3.1 operating system. However, the Windows Help program has not had a major update for many releases and no longer meets Microsoft's standards. Therefore, starting with the release of Windows Vista, the Windows Help program will not ship as a feature of Windows."

How Microsoft can get away with the cussed irony of condemning their own software for not meeting their standards is beyond me.

Month List