[GRASS-dev] Re: [GRASS-CVS] michael: grass6/gui/tcltk/gis.m mapcanvas.tcl, 1.52, 1.53

Michael Barton michael.barton at asu.edu
Thu Nov 30 01:58:53 EST 2006


On 11/29/06 11:45 PM, "Hamish" <hamish_nospam at yahoo.com> wrote:

> Great work. For me the latest version in CVS fails nicely for both the
> missing libgdal.so and missing g.region cases. (I only tested 6.3-cvs)
> 
> I made a slight change in 6.3-cvs: exit with return code of "1" on
> error. (unlike bash, tcl's "exit" defaults to "0" if not given; bash
> defaults to the return code of the last command run if not given)
> 

Great. I'm glad it gives a more informative error now. Hopefully that will
help the batch of people who are having trouble with gdal.


> As the gis.m script runs gm.tcl via "exec" this doesn't really have any
> effect AFAICT, but it's good practice.

What is the difference between exit 0, exit 1, etc? I've seen this in a
number of places but can't tell what it does.

> 
> oh, and FWIW I figured out why my tcl exec solution was failing with:
>  ERROR: region <> not found
> It was trying to run `g.region ""`  (expands to `g.region region=""`)
> 
> It's redundant now, but for the record adding a "concat" fixed it:

Watch out. You're becoming a TclTk expert. ;-)

Michael
__________________________________________
Michael Barton, Professor of Anthropology
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