submenus in popup-menus?
Hi. Ive got a hard time finding the errors im doing in some callbacks
assigned to a submenu of a 'contextual' menu (popup-menu, mouse-3,
right-click...).
There are 2 interfaces set up at the bottom, one with a standard menu w.
submenu - working as expected - and one using the same menu-elements in
a 2-level popup-menu - where the sub-menu elements dont work.
Any clues to whats going on is highly appreciated.
-anders
(defun showelem (data iface)
(display-message "~A" (list data iface)))
(setq m1 (make-instance 'menu
:items '("Red" "Blue" "Green")
:callback 'showelem))
(setq m2 (make-instance 'menu
:items (list 1 2 3 4 m1)
:callback 'showelem))
(defun popup-test (pane x y)
(capi:display-popup-menu
(make-instance 'capi:menu
:items (list 1 2 3 4 m1)
:callback 'showelem)))
(define-interface test ()
()
(:panes
(viewer output-pane
:visible-min-height 100
:visible-min-width 100
:input-model '((:post-menu popup-test)))))
;; selecting the items in submenu calls the callback-func:
(display (make-instance 'test))
;; selecting the items in (right-click) submenu does not call the
;; callback-func:
(display (make-instance 'interface
:menu-bar-items (list m2)
:visible-min-height 100
:visible-min-width 100))
_______________________________________________
Lisp Hug - the mailing list for LispWorks users
lisp-hug@lispworks.com
http://www.lispworks.com/support/lisp-hug.html