[GRASS-dev] Re: not quite there on fonts

Michael Barton michael.barton at asu.edu
Sun May 13 11:38:44 EDT 2007




On 5/13/07 5:44 AM, "Glynn Clements" <glynn at gclements.plus.com> wrote:

> 
> Hamish wrote:
> 
>>> I had to do this in the menu entry instead of guarantee_xmon because
>>> the procedure calls the spawn to run the command.
>> 
>> spawn is still "downstream" of the Tcl GUI, or is it somehow a sibling
>> to it?
> 
> spawn is part of the GUI, so it shares the same environment with the
> rest of the GUI.
> 
> I'm not sure why putting the setting in guarantee_xmon wouldn't work,
> unless the "global env" was overlooked (if you forget that, you're
> modifying a local variable named "env" rather than the actual
> environment which is passed on to child processes).

Turning it on is not problem. It's turning it off. You can't put unset
env(GRASS_RENDER_IMMEDIATE) after the call to spawn at the end of the
procedure because it will unset the variable before the command is done. And
it is complicated to put it into spawn because that procedure is used by
processes that don't need the environmental setting as well as processes
that do. 

It is of course possible to rewrite the procedures in question to pass a
variable calling for resetting this, but it could have unforseen
consequences elsewhere in the GUI code. There are only 3 or so commands that
need it, so I opted to just add it into the menu command rather than do more
rewriting and debugging.

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