[GRASS-dev] Re: gis.m: font selection in module panels

Michael Barton michael.barton at asu.edu
Sun May 20 17:13:09 EDT 2007


Real weird. See below


On 5/20/07 6:27 AM, "Moritz Lennert" <mlennert at club.worldonline.be> wrote:

> Michael,
> 
> Thanks for the font selection in the module panels, but I have the
> following problem. I can select the font the first time, but when I try to
> open the font dialog a second time in the same panel, I get:
> 
> can't read "env(GRASS_FONT)": no such variable
> can't read "env(GRASS_FONT)": no such variable

OK. GRASS_FONT is not set.

>     while executing
> "if {[info exists env(GRASS_FONT)] && $env(GRASS_FONT) != ""} {

This is checking to see if GRASS_FONT is set or not. If not set, the clause
if false and it should move to the else clause. It should not be raising an
error.

Try taking out the 2nd part of this clause && $env(GRASS_FONT) != "" and see
what happens. The 2nd part is sort of redundant anyway.

Michael

> set fontindex [lsearch $fontlist $env(GRASS_FONT)]
> if {$fontindex > -1} {
>    ..."
>     (procedure "Gm:DefaultFont" line 26)
>     invoked from within
> "Gm:DefaultFont dbarscale"
>     (procedure "GmBarscale::set_font" line 5)
>     invoked from within
> "GmBarscale::set_font 1"
>     ("uplevel" body line 1)
>     invoked from within
> "uplevel \#0 $cmd"
>     (procedure "Button::_release" line 18)
>     invoked from within
> "Button::_release .mainframe.frame.pw1.f1.frame.sw.sf.frame.fr.color.d"
>     (command bound to event)
> 
> Moritz
> 

__________________________________________
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