In a recent update, the nice radiobutton interface to g.mapsets (the one that gives you access to different mapsets within a location) ‘disappeared’ when the command is called. The tcltk script that produces this interface (g.mapsets.tcl) still is compiled in $GISBASE/etc but can’t be called from the command line without specifying the path. There are various ways too correct this, but an easy one seems to be moving g.mapsets.tcl into the $GISBASE/etc/dm/script directory.
I can simply move it and commit it to the CVS as a new file, and ask Bernard to delete the old version. Or the Makefile for g.mapsets (g.mapsets.tcl is found in this directory in the source distribution) can be changed to put g.mapsets.tcl into $GISBASE/etc/dm/script at the time of compilation.
Which way is the best to do this? Or is there yet a better way to get the same result?
Michael
Michael Barton, Professor of Anthropology
School of Human Diversity and Social Change
Arizona State University
Tempe, AZ 85287-2402
USA
voice: 480-965-6262; fax: 480-965-7671
www: http://www.public.asu.edu/~cmbarton
Michael Barton wrote:
In a recent update, the nice radiobutton interface to g.mapsets (the one
that gives you access to different mapsets within a location) Œdisappeared¹
when the command is called.
Right. g.mapsets was changed when I removed front.end. Now, rather
than having separate cmd/inter versions, the single version does this:
if (argc < 2)
execl("/bin/sh", "sh", "-c", "$GISBASE/etc/g.mapsets.tcl", NULL);
However, that only works if g.mapsets is run without arguments.
That will have stopped working when the tcltkgrass "execute" procedure
was changed to use the --tcltk switch. The new version of execute uses
--tcltk, and expects the program to generate Tcl/Tk code on its
stdout, which is then executed.
For the Tcl/Tk case, the simplest solution is to change menu.tcl to
use e.g. "spawn $env(GISBASE)/etc/g.mapsets.tcl" instead of attempting
to run the g.mapsets program.
--
Glynn Clements <glynn.clements@virgin.net>
OK. This sounds reasonable. I'll make the change to menu.tcl and commit it.
Michael
On 10/15/04 2:08 PM, "Glynn Clements" <glynn.clements@virgin.net> wrote:
Michael Barton wrote:
In a recent update, the nice radiobutton interface to g.mapsets (the one
that gives you access to different mapsets within a location) ?disappeared?
when the command is called.
Right. g.mapsets was changed when I removed front.end. Now, rather
than having separate cmd/inter versions, the single version does this:
if (argc < 2)
execl("/bin/sh", "sh", "-c", "$GISBASE/etc/g.mapsets.tcl", NULL);
However, that only works if g.mapsets is run without arguments.
That will have stopped working when the tcltkgrass "execute" procedure
was changed to use the --tcltk switch. The new version of execute uses
--tcltk, and expects the program to generate Tcl/Tk code on its
stdout, which is then executed.
For the Tcl/Tk case, the simplest solution is to change menu.tcl to
use e.g. "spawn $env(GISBASE)/etc/g.mapsets.tcl" instead of attempting
to run the g.mapsets program.
______________________________
Michael Barton, Professor of Anthropology
School of Human Diversity and Social Change
Arizona State University
Tempe, AZ 85287-2402
USA
voice: 480-965-6262; fax: 480-965-7671
www: http://www.public.asu.edu/~cmbarton