Michael Brown October 14 2009 04:13:58 AMOne of the nice features of the new 8.5.1 Designer is its error trapping features. These are leaps and bounds above previous versions of Designer.
For a start, you can save your code even if it's got compilation errors in it. Yes, that's right!! No more having to comment out shitloads of code, so you can find out a compilation error buried in a library somewhere, only to come back and realise that you can't remember which lines you commented out just to get the damned agent saved!
Here's another, simple example of the new error trapping features. When I looked at some existing databases in the 8.5.1 Designer, I noticed that some of them were marked with a small red cross. This one, for example:
When I opened the database branch, I could see further red marks against Agents and Script Libraries:
There's only one Script Library in this particular database. If I open it, I see that the error is in the ReplaceSubString function. When I open that function, I can see another red cross against the line of code that has the problem. Hovering my mouse cursor over the red cross gives me a pop-up, telling me what the actual error is: "Unexpected replace..." in this case.
I easily guessed the problem. The developer (not me!) used replace as a variable name. A later version of Notes came along and made replace a reserved word. Easy to fix: I just need to use something like "replaceString" as the variable name instead. I make the first substitution on the line that was flagged, and immediately the red cross moves down to the next line with an error.
I make the change from "replace" to "replaceString" on that line too, and finally, my error crosses have gone.
At least, they've gone at that level. In the applications list on the left hand of the designer, my Script Libraries are still flagged with a red cross. I had to do a Tools->Recompile LotusScript to finally get rid of the red crosses at that level. Not even shutting down and re-opening the Designer worked at first.
- Comments