[GRASS-dev] select issue with wingrass

Glynn Clements glynn at gclements.plus.com
Sun Nov 18 10:42:20 EST 2007


Glynn Clements wrote:

> > I have advanced a little bit trying to debug this, although I have no idea
> > why this has suddenly appeared and wasn't there all the time, and I'm,
> > therefore, not sure that this is really the origin of the problem.
> > 
> > select.tcl uses both the GISDBASE and MAPSET env variables.
> 
> They aren't supposed to be environment variables.
> 
> I'm surprised that select.tcl has worked so far. It should be using
> g.gisenv to get those values.

Ah; the reason it's been working so far is that both lib/gis/gui.tcl
and gui/tcltk/gis.m/gm.tcl set them, e.g.:

if {[catch {set env(GISDBASE) [exec g.gisenv get=GISDBASE]} error]} {

Any other code which uses select.tcl will need to do likewise.

Use of env() is less than ideal (there's already enough confusion
between GRASS variables and environment variables), but using separate
variables would require changing a lot of "global" statements.

-- 
Glynn Clements <glynn at gclements.plus.com>


More information about the grass-dev mailing list