[GRASS-dev] g.gisenv in gui

Michael Barton michael.barton at asu.edu
Fri Jun 8 12:18:58 EDT 2007


I don't quite follow the proposed changes below, but I trust you that this
will probably fix things.

Michael


On 6/8/07 6:30 AM, "Glynn Clements" <glynn at gclements.plus.com> wrote:

> 
> Michael Barton wrote:
> 
>> Found another minor item that a small change could improve.
>> 
>> g.gisenv does not behave like other GRASS commands in that you cannot launch
>> the autogenerated gui by typing �g.gisenv� from the command line. Instead,
>> you get the current environment settings. You can only get the gui if you
>> run it through some special processing in the GUI.
> 
> See Hamish's reply.
> 
>> Likewise, you can�t get
>> it to print out current environment settings from the gui unless you do some
>> tricks with its execution.
> 
> AFAICT, the problem with g.gisenv is that it checks for argc==1 before
> calling G_parser(), so e.g. "g.gisenv --quiet" causes that check to
> fail.
> 
> What it should probably do is to call G_parser() unconditionally, then
> check for:
> 
> if (!get->answer && !set->answer && !store_opt->answer)
> 
>> To behave more �normally� it needs a �p flag. Then...
>> 
>> g.gisenv -> autogenerated gui
>> g.gisenv �p -> print current settings.
>> 
>> I suppose that this would break a bunch of scripts, but it would be nice if
>> it could work consistently with other commands.
> 
> I suspect that this is unnecessary if the no-arguments check is fixed.

__________________________________________
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