[GRASS5] [bug #2488] (grass) GRASS 5.7 WISH - improve string reading ability in g.parser

Glynn Clements glynn.clements at virgin.net
Tue Aug 3 21:43:28 EDT 2004

Michael Barton wrote:

> It may (or may not) also be related to NVIZ not starting from the
> autogenerated GUI. Currently, you have to start NVIZ from the command line
> using the -q switch, then add data after it is running. That is, you can't
> specify initial raster, vector, ect. files in the startup GUI dialog. If you
> try to start NVIZ this way, it will crash.

I'm fairly sure that particular issue isn't related to Tcl/Tk. The
reports of NVIZ crashing unless you use -q indicate that it crashes if
you specify the arguments on the command line, e.g. "nviz elevation=...",
where Tcl/Tk isn't involved.

> I don't remember running into this in 5.3, but the GUI is very different in
> 5.3; G.PARSER() works but doesn't autogenerate the dialog boxes. They are
> each coded individually.

The 5.0/5.3 problems are essentially the same bugs, but in different
code. 5.0/5.3 has tcltkgrass, which is a self-contained Tcl/Tk program
which works by executing GRASS commands.

In 5.7, the problems are in G_gui(), which is called by G_parser(),
which is used by most commands to parse the command line. In 5.0/5.3,
if a command was run without arguments, G_parser() would ask the user
for the infomation via the terminal. In 5.7, it generates and runs a
Tcl/Tk program which displays a dialog, then re-executes the command
using the data from the dialog fields as arguments.

In both cases, you have Tcl/Tk code which attempts to construct and
execute a command line; in both cases, the code was wrong, for
essentially the same reasons.

Glynn Clements <glynn.clements at virgin.net>

More information about the grass-dev mailing list