<Menu> acts funny

From: Paul Stravers <Paul.Stravers_at_gmd.de>
Date: Fri, 7 Oct 1994 15:45:05 +0100

Building a menu with plain STk works fine. Building the same menu with STklos,
it seems that the menu entries don't get activated and can never be
selected. Please can somebody explain me what I'm missing here? Thank you!

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
(require "Frame")
(require "Menu")

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; a menu with the <Frame> and <Menu> STklos classes:
;;
(define bar (make <Frame> :relief "raised" :borderwidth 1))
(define bar-colors (make <Menu-button> :text "Colors (STklos)"))
(define bar-colors-m (make <Menu>))
(set! (menu-of bar-colors) bar-colors-m)
(menu-add bar-colors-m 'command :label "Red" :command '(quit))
(menu-add bar-colors-m 'command :label "Green" :command '(quit))

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; The same menu, now with plain STk:
;;
(frame ".bar" :relief "raised" :borderwidth 1)
(menubutton ".bar.colors" :text "Colors (plain STk)" :menu ".bar.colors.m")
(menu ".bar.colors.m")
(.bar.colors.m 'add 'command :label "Red" :command '(quit))
(.bar.colors.m 'add 'command :label "Green" :command '(quit))

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
(pack 'append "." .bar "top fillx" bar "top fillx")
(pack .bar.colors :side "left")
(pack bar-colors :side "left")

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

Paul Stravers
 -----------------------------------------------------------------------------
           GMD german national research center for computer science

             Schloss Birlinghoven, 53754 Sankt Augustin, Germany
       paul.stravers_at_gmd.de fax +49 2241 142035 vox +49 2241 142586
 -----------------------------------------------------------------------------
Received on Fri Oct 07 1994 - 16:14:29 CET

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