[GRASS-dev] select issue with wingrass

Michael Barton michael.barton at asu.edu
Sun Nov 18 11:12:30 EST 2007


If this is set in gui.tcl (the first thing run by the GRASS TclTk gui),
won't it then be available to all other gui modules?

That is, why can't select.tcl access GISBASE if env(GISBASE) is set in
gui.tcl?

Michael


On 11/18/07 8:42 AM, "Glynn Clements" <glynn at gclements.plus.com> wrote:

> 
> 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.

__________________________________________
Michael Barton, Professor of Anthropology
Director of Graduate Studies
School of Human Evolution & Social Change
Center for Social Dynamics & Complexity
Arizona State University

phone: 480-965-6213
fax: 480-965-7671
www: http://www.public.asu.edu/~cmbarton




More information about the grass-dev mailing list