STk: Selection of menu item has no effect

From: Guenther Goerz <>
Date: Thu, 14 Mar 2002 16:04:33 +0100 (MET)

Dear Erick, dear STkers,

a while ago one of our students wrote a program for Paul Lorenzen's
dialogue logic as part of his diploma (master's) thesis. Although
there is a line mode which should run in any Scheme system, he
implemented a nice graphical interface with STk. With recent STk
versions (the latest one for Windows as well as that for Linux, which
I downloaded from your site) the following problem came up:

In the program's main window there is a menu bar. Selecting one of
its items, a pop-up submenu comes up in which several items can be
selected. The effect of such a selection is that the value of a
variable should be set from #f (the default value) to #t which in turn
should cause the appearance of another window. What happens is that
the value(s) of the resp. variables are not affected by selecting the
corresponding menu item (which used to work before). This can easily
be verifed by asking for the value in the main STk window after
clicking the corresponding menu item. However, if I set the value in
the main STk window, everything works as it should do.

Here is a small section of the code with one of the crucial items:

( 'add 'checkbutton '-label "Benutzerspiel"
     '-underline 6=20
     '-variable "benutzerspiel" '-onvalue #t '-offvalue #f
     '-command (lambda ()
          (if benutzerspiel

The function "benuterspiel-an" is defined in another file which begins
as follows:

(define benutzerspiel #f)

(define benutzerspiel-an
  (lambda ()=20
    (set! benutzerspiel #t)
    (ausgabe mitteilung 'benutzerspiel_an '())

(define benutzerspiel-aus
  (lambda ()
    (set! benutzerspiel #f)
    (ausgabe mitteilung 'benutzerspiel_aus '())))

and the "dialogausgabe" functions are:

(define dialogausgabe #f)

(define dialogausgabe-an
  (lambda ()=20
    (set! dialogausgabe #t)
    (ausgabe mitteilung 'dialogausgabe_an '())))

(define dialogausgabe-aus
  (lambda ()=20
    (set! dialogausgabe #f)
    (ausgabe mitteilung 'dialogausgabe_aus '())))

"ausgabe" is a YASOS method.

Do you have an explanation? The only related subject in the mailing
list I found was "event following popup menu lost" from Sep. 1999, but
the bug fix you poposed there is contained in both versions (Win98 and
Linux) of menu.stk .

->> By the way: Is there no way to remove all the junk and spam from
->> the mail archive?

Thanks a lot in advance,
sincerely yours,

-- Günther Görz

-- ---------------------------------------------------------------------------
Prof. Dr. Guenther Goerz Fon: (+49 9131) 852-8701; -8702
Univ. Erlangen-Nuernberg Fax: (+49 9131) 852-8986
Institut f. Informatik 8/AI (Comp.Sci.)
Haberstrasse 2
Received on Thu Mar 14 2002 - 16:04:31 CET

This archive was generated by hypermail 2.3.0 : Mon Jul 21 2014 - 19:38:59 CEST