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

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
    while executing
"if {[info exists env(GRASS_FONT)] && $env(GRASS_FONT) != ""} {
      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

Real weird. See below

On 5/20/07 6:27 AM, "Moritz Lennert" <mlennert@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

On Sun, May 20, 2007 23:13, Michael Barton wrote:

Real weird. See below

On 5/20/07 6:27 AM, "Moritz Lennert" <mlennert@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 :wink:

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

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@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@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 :wink:

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

On Mon, May 21, 2007 00:08, Michael Barton wrote:

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 }

Yes, it does. See attached screenshot.

Must be something else.

But now I need some sleep :wink:

Moritz

(attachments)

tclsh_env.png

Moritz,

For when you get up tomorrow.

Try this for the entire if clause

    if {![info exists env(GRASS_FONT)]} {
        set fontindex -1
    } elseif {$env(GRASS_FONT) != ""} {
        set fontindex [lsearch $fontlist $env(GRASS_FONT)]
        if {$fontindex > -1} {
            $fontlb selection set $fontindex
            $fontlb see $fontindex
        }
    }

I'm kind of waving a dead chicken, but maybe this syntax will work.

Michael

On 5/20/07 6:27 AM, "Moritz Lennert" <mlennert@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
    while executing
"if {[info exists env(GRASS_FONT)] && $env(GRASS_FONT) != ""} {
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

Michael Barton wrote:

> 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.

is it missing

  global env

?

Hamish

It is in the procedure. Perhaps need to express it as
    
    global env
    global iconpath

instead of ...

    global env iconpath

Michael

On 5/20/07 7:54 PM, "Hamish" <hamish_nospam@yahoo.com> wrote:

Michael Barton wrote:

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.

is it missing

  global env

?

Hamish

__________________________________________
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

Michael Barton wrote:

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.

In general, it's safer to just try something and catch any errors
which occur than to attempt to predict errors.

FWIW, I would change:

  if {[info exists env(GRASS_FONT)] && $env(GRASS_FONT) != ""} {
    ...
  }
to:
  catch {
    if {$env(GRASS_FONT) != ""} {
      ...
    }
  }

BTW, I did find this (dtext.tcl:338):

  if {$currfont == "" && [info exists env(GRASS_FONT]} {

Note the missing closing parenthesis.

Also, it looks as if someone has been editing the code with 4-column
tab stops, so the formatting is screwed up. Again: if you want to use
4-column tabs in your own code, fine, but don't do it in GRASS.

--
Glynn Clements <glynn@gclements.plus.com>

Normally, either GRASS_FONT has been set or it hasn't. It probably won't be
set to "". How is the best way to determine if it has been set or not?

Michael

On 5/20/07 8:50 PM, "Glynn Clements" <glynn@gclements.plus.com> wrote:

FWIW, I would change:

if {[info exists env(GRASS_FONT)] && $env(GRASS_FONT) != ""} {
...
}
to:
catch {
if {$env(GRASS_FONT) != ""} {
...
}
}

__________________________________________
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

Michael Barton wrote:

Normally, either GRASS_FONT has been set or it hasn't. It probably won't be
set to "". How is the best way to determine if it has been set or not?

Try to use it and catch any errors.

If the following fails:

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

then omitting the second half and using just:

  if {[info exists env(GRASS_FONT)]} {

will presumably fail at the point that $env(GRASS_FONT) is used, for
the same reasons.

--
Glynn Clements <glynn@gclements.plus.com>

Thanks.

Michael

On 5/21/07 11:31 AM, "Glynn Clements" <glynn@gclements.plus.com> wrote:

Michael Barton wrote:

Normally, either GRASS_FONT has been set or it hasn't. It probably won't be
set to "". How is the best way to determine if it has been set or not?

Try to use it and catch any errors.

If the following fails:

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

then omitting the second half and using just:

if {[info exists env(GRASS_FONT)]} {

will presumably fail at the point that $env(GRASS_FONT) is used, for
the same reasons.

__________________________________________
Michael Barton, Professor of Anthropology
School of Human Evolution & Social Change
Center for Social Dynamics and Complexity
Arizona State University

phone: 480-965-6213
fax: 480-965-7671
www: http://www.public.asu.edu/~cmbarton

On Mon, May 21, 2007 04:46, Michael Barton wrote:

Moritz,

For when you get up tomorrow.

Try this for the entire if clause

    if {![info exists env(GRASS_FONT)]} {
        set fontindex -1
    } elseif {$env(GRASS_FONT) != ""} {
        set fontindex [lsearch $fontlist $env(GRASS_FONT)]
        if {$fontindex > -1} {
            $fontlb selection set $fontindex
            $fontlb see $fontindex
        }
    }

Doesn't work, but I'm getting closer to identifying the problem:
Going back to the original version and just erasing the second part of the
if clause, I now notice (a bit more awake than yesterday) that I still get
an error message, but not the same:

can't read "env(GRASS_FONT)": no such variable
can't read "env(GRASS_FONT)": no such variable
    while executing
"lsearch $fontlist $env(GRASS_FONT)"
    (procedure "Gm:DefaultFont" line 27)
    invoked from within
"Gm:DefaultFont dbarscale"
    (procedure "GmDtext::set_font" line 5)
    invoked from within
"GmDtext::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.fontopt1.b"
    (command bound to event)

So actually the problem is not the 'if exists' clause, but it's
'$env(GRASS_FONT)'. For some reason, it seems like it does not recognize
env() as the function it is, but rather it tries to get the content of a
variable name 'env(GRASS_FONT)'. GRASS_FONT is recognized as existing,
since it passes the test 'if {[info exists env(GRASS_FONT)]}'.

I cannot reproduce this directly in tclsh, though, so I am a bit lost.
Changing the way env is declared as global at the beginning of the
function does not help either.

I'm kind of waving a dead chicken, but maybe this syntax will work.

Chicken still just as dead.

Moritz

Michael

On 5/20/07 6:27 AM, "Moritz Lennert" <mlennert@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
    while executing
"if {[info exists env(GRASS_FONT)] && $env(GRASS_FONT) != ""} {
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

Moritz Lennert wrote:

> For when you get up tomorrow.
>
> Try this for the entire if clause
>
> if {![info exists env(GRASS_FONT)]} {
> set fontindex -1
> } elseif {$env(GRASS_FONT) != ""} {
> set fontindex [lsearch $fontlist $env(GRASS_FONT)]
> if {$fontindex > -1} {
> $fontlb selection set $fontindex
> $fontlb see $fontindex
> }
> }
>

Doesn't work, but I'm getting closer to identifying the problem:
Going back to the original version and just erasing the second part of the
if clause, I now notice (a bit more awake than yesterday) that I still get
an error message, but not the same:

can't read "env(GRASS_FONT)": no such variable
can't read "env(GRASS_FONT)": no such variable
    while executing
"lsearch $fontlist $env(GRASS_FONT)"
    (procedure "Gm:DefaultFont" line 27)
    invoked from within
"Gm:DefaultFont dbarscale"
    (procedure "GmDtext::set_font" line 5)
    invoked from within
"GmDtext::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.fontopt1.b"
    (command bound to event)

So actually the problem is not the 'if exists' clause, but it's
'$env(GRASS_FONT)'. For some reason, it seems like it does not recognize
env() as the function it is, but rather it tries to get the content of a
variable name 'env(GRASS_FONT)'. GRASS_FONT is recognized as existing,
since it passes the test 'if {[info exists env(GRASS_FONT)]}'.

I can only conclude that "info exists ..." doesn't do what you want
when applied to array elements.

You could try catching the error, and dumping out "env" with
"array get env" to see if that provides any clues.

--
Glynn Clements <glynn@gclements.plus.com>

I'll just have to put a catch around it. But it bothers me not knowing why
this is a problem with Windows TclTk.

Michael

On 5/21/07 7:34 PM, "Glynn Clements" <glynn@gclements.plus.com> wrote:

Moritz Lennert wrote:

For when you get up tomorrow.

Try this for the entire if clause

    if {![info exists env(GRASS_FONT)]} {
        set fontindex -1
    } elseif {$env(GRASS_FONT) != ""} {
        set fontindex [lsearch $fontlist $env(GRASS_FONT)]
        if {$fontindex > -1} {
            $fontlb selection set $fontindex
            $fontlb see $fontindex
        }
    }

Doesn't work, but I'm getting closer to identifying the problem:
Going back to the original version and just erasing the second part of the
if clause, I now notice (a bit more awake than yesterday) that I still get
an error message, but not the same:

can't read "env(GRASS_FONT)": no such variable
can't read "env(GRASS_FONT)": no such variable
    while executing
"lsearch $fontlist $env(GRASS_FONT)"
    (procedure "Gm:DefaultFont" line 27)
    invoked from within
"Gm:DefaultFont dbarscale"
    (procedure "GmDtext::set_font" line 5)
    invoked from within
"GmDtext::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.fontopt1.b"
    (command bound to event)

So actually the problem is not the 'if exists' clause, but it's
'$env(GRASS_FONT)'. For some reason, it seems like it does not recognize
env() as the function it is, but rather it tries to get the content of a
variable name 'env(GRASS_FONT)'. GRASS_FONT is recognized as existing,
since it passes the test 'if {[info exists env(GRASS_FONT)]}'.

I can only conclude that "info exists ..." doesn't do what you want
when applied to array elements.

You could try catching the error, and dumping out "env" with
"array get env" to see if that provides any clues.

__________________________________________
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

Hello all
I returned to this problem because I noticed there was still some unpredictable behaviour on Windows and we never really solved it.

On Sun, 20 May 2007, Michael Barton wrote:

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 }

Yes indeed. After a bit more web searching I found some discussion of a specific problem with using "info exists" on the env array on Windows. Seemingly related to the fact that Windows handles the unsetting of an environment variable by setting it to an empty string, and the way Tcl maps the env array directly to the environment on the system it is running on gets confused by this.

Maybe if I wrap it in a catch statement...? Anyone have a suggestion about
this.

Yes, exactly! That was the workaround that was suggested in the discussion thread I found:
Change
[info exists env(GRASS_FONT)]
to
![catch {set env(GRASS_FONT)}]

This works because set env(GRASS_FONT) tries to read the variable - if it doesn't exist, throws an exception, which is caught by the catch command. And if there is no catch (! negation operator used), then it means the variable does actually exist.

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.

It seems the problem is specifically related to using info exists on the env array on Windows. So not too widespread. I have changed all the occurences in gis.m to the workaround and committed it to CVS.

I also changed the text of the font selection box from "Select default font for GRASS displays" to "Select GRASS display font", as the former text was quite confusing seeing as the font select box is also used in the widgets for d.text, d.histogram etc. to select a temporary fault to override the default. I also found a related bug there, which I now know how it's caused but don't know enough Tcl/Tk to fix it:

When clicking the font button in d.histogram for example, it will default to having the default font (loaded from the GRASS_FONT environment variable) selected, not the last font that was selected for d.histogram - a little confusing there, but not a big deal. However the main problem is that if you just click OK here, you would expect the font that was displayed as selected in the select box to be set as the font for d.histogram to use. But it is not, unless you first go and click on it (and nothing *appears* to change, because it was already selected). Very confusing. The reason seems to be that the command that sets the font to the one selected is bound to the <<ListboxSelect>> event, which is only triggered when the font selection is *changed*. Clicking on it again triggers this event, but it's not reasonable to expect users to do that when it already is selected. I think it would be more logical (and solve this problem) if the command that sets the font from the select box was instead bound to the OK button, but I don't know enough to see how to change this...

Paul

Thanks for this really insightful diagnosis of a difficult problem. I'm just
returned and am going to be delving back into the TclTk GUI for a few more
fixes soon. I'll try to see what can be done about the font selection
bindings.

Michael

On 7/27/07 7:31 AM, "Paul Kelly" <paul-grass@stjohnspoint.co.uk> wrote:

Hello all
I returned to this problem because I noticed there was still some
unpredictable behaviour on Windows and we never really solved it.

On Sun, 20 May 2007, Michael Barton wrote:

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 }

Yes indeed. After a bit more web searching I found some discussion of a
specific problem with using "info exists" on the env array on Windows.
Seemingly related to the fact that Windows handles the unsetting of an
environment variable by setting it to an empty string, and the way Tcl
maps the env array directly to the environment on the system it is running
on gets confused by this.

Maybe if I wrap it in a catch statement...? Anyone have a suggestion about
this.

Yes, exactly! That was the workaround that was suggested in the
discussion thread I found:
Change
[info exists env(GRASS_FONT)]
to
![catch {set env(GRASS_FONT)}]

This works because set env(GRASS_FONT) tries to read the variable - if it
doesn't exist, throws an exception, which is caught by the catch command.
And if there is no catch (! negation operator used), then it means the
variable does actually exist.

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.

It seems the problem is specifically related to using info exists on the
env array on Windows. So not too widespread. I have changed all the
occurences in gis.m to the workaround and committed it to CVS.

I also changed the text of the font selection box from "Select default
font for GRASS displays" to "Select GRASS display font", as the former
text was quite confusing seeing as the font select box is also used in the
widgets for d.text, d.histogram etc. to select a temporary fault to
override the default. I also found a related bug there, which I now know
how it's caused but don't know enough Tcl/Tk to fix it:

When clicking the font button in d.histogram for example, it will default
to having the default font (loaded from the GRASS_FONT environment
variable) selected, not the last font that was selected for d.histogram -
a little confusing there, but not a big deal. However the main problem is
that if you just click OK here, you would expect the font that was
displayed as selected in the select box to be set as the font for
d.histogram to use. But it is not, unless you first go and click on it
(and nothing *appears* to change, because it was already selected). Very
confusing. The reason seems to be that the command that sets the font to
the one selected is bound to the <<ListboxSelect>> event, which is only
triggered when the font selection is *changed*. Clicking on it again
triggers this event, but it's not reasonable to expect users to do that
when it already is selected. I think it would be more logical (and solve
this problem) if the command that sets the font from the select box was
instead bound to the OK button, but I don't know enough to see how to
change this...

Paul

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