[GRASS-dev] select issue with wingrass

Glynn Clements glynn at gclements.plus.com
Sun Nov 18 20:49:09 EST 2007


Moritz Lennert wrote:

>  > 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.
> 
> Changing above line to
> 
> if {[catch {set env(GISDBASE) [exec g.dirseps -g [exec g.gisenv get=GISDBASE]]} error]} {
> 
> in lib/gis/gui.tcl seems to work for me. Can I commit ?
> 
> Should I also change this in gui/tcltk/gis.m/gm.tcl ?

Have you tried "file normalize"? If that works, it's preferable to
spawning g.dirseps.

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


More information about the grass-dev mailing list