Fog Creek Software
Discussion Board

Knowledge Base
Terry's Tips
Darren's Tips

Feature request: clear errors cityscript

The errors of cityscript are currently very cryptic. To find them, I use IE6 to view the file, then view source, then copy-paste source into UltraEdit, then switch to hex, calculate decimal position into hex; position cursor and then I've found the error.
(e.g. ForEach: expected condition (\Copy of index:1378)

My suggestion: line# col# is more readable
Best: print line with error and ^ under line at col#.

Adriaan van den Brand
Friday, April 26, 2002

One step better: put a red squiggle or other visual signal under bad cityscript as you're writing it, like the VB editor. (This is a simplistic way of stating the problem, but you'll get what I mean.)

This, of course, assumes that you are going to replace the current cruddy IE HTML editor control with something homebuilt (which I think somebody said is on the list for v2).

Brian St. Pierre
Tuesday, April 30, 2002

Line# col# are universal
If CityDesk writes them in a error-file (like normal compilers do) then it can be used to direct the cursor to the error position (for instance this is possible using CodeWright)

Problem is of course that in Citydesk, errors can be caused by variable expansion, so the real error might be in {$.do_some_magic$} and also that the source files only exist inside a database; not directly editable by external editors.

Adriaan van den Brand
Wednesday, May 1, 2002

Lazy programmer talking, here: Actually tracking down where the errors are turned out to be a bit trickier than I thought at first. What if you have a loop that brings in a bunch of articles, one of which uses a variable in its body which in turn creates a loop that brings in a bunch of articles one of which has a syntax error. :) So the error tracking is not very good in this version.

The good news is that we have something to work on for the next version. There weren't enough feature ideas in this discussion group already :)

Joel Spolsky
Thursday, May 2, 2002

*  Recent Topics

*  Fog Creek Home