[plt-scheme] MrEd - Menubar

From: Laurent (Ouaibou at gmail.com)
Date: Sun Apr 1 13:19:58 EDT 2007

Hello,

I have a question about the menu-items.
I want to modify a variable when I click above a menu-item.

So, i use this :

(define menu-item-sound-effects (new menu-item%
                                     (parent menu-option)
                                     (label (if SOUND-EFFECT
                                                "Désactiver les effets
sonores"
                                                "Activer les effets
sonores"))
                                     (shortcut #\123)
                                     (callback (lambda (item event)
                                                 (set! SOUND-EFFECT
(not SOUND-EFFECT))))))

But the following line seems not to perform.
I don't understand why.

Could somebody explain me?

Thanks,
Laurent



Posted on the users mailing list.