[GRASS-dev] Re: gis.m: font selection in module panels
Michael Barton
michael.barton at asu.edu
Sun May 20 18:08:57 EDT 2007
It seems like the issue is that this method to check to see if a variable
has been set won't work under windows.
if {[info exists VAR]} { do something }
Maybe if I wrap it in a catch statement...? Anyone have a suggestion about
this.
If the diagnosis is correct, it is a fairly major projblem. This same method
of testing if a variable exists is sprinkled throughout the GUI code, so we
need to find an alternative. I don't know what it would be at the moment.
Michael
On 5/20/07 3:07 PM, "Moritz Lennert" <mlennert at club.worldonline.be> wrote:
> On Sun, May 20, 2007 23:13, Michael Barton wrote:
>> 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.
>
> Doesn't help.
>
> But here is some more info:
>
> 1) This is under Windows (tiny detail I forgot to mention before ;-)
>
> 2) This does not happen if I start by setting a default font (Config->Set
> default display font)
>
> 3) If I don't set a default font, I get the problems in several ways
>
> a) add text layer ; type some text ; display ; click on font selection
> button
> b) add text layer ; type some text ; add second text layer ; type some
> text; display
> c) idem for any combination of layers containing fonts (e.g. add one
> barscale and one grid)
>
> Hope this helps finding the problem.
>
> 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