CLIM mail archive


problems with menus and interactors


we are having a little problem with menu-bars and

We use CLIM 2.0.beta on Allegro 4.2 beta 2.0, and here is a 
simple example of what we'd like to have:

(defvar *my-app*)

(clim:define-command-table global)
(clim:define-command-table local)

(clim::define-application-frame pipapo ()
  (:pointer-documentation nil)
  (:command-table (pipapo-commands
		   :inherit-from (clim:global-command-table
		   :inherit-menu nil
		   :menu (("Exit" :command (com-exit))
			  ("Test" :menu local))))
  (:panes         (interaction-pane :interactor)
		  (empty-pane :application))
  (:layouts       (default
		    (clim:vertically  ()
			         (1/2 empty-pane)
			         (1/2 interaction-pane))))
  ;;(:command-definer t)

(clim:define-command (com-exit :menu "Exit"
			       :name "Exit"
			       :command-table global)
  (clim:frame-exit *my-app*))

(clim:define-command (com-test :menu "test"
			       :name "test"
			       :command-table local)
  (format (clim:get-frame-pane *my-app* 'empty-pane) "TEST! " ))

(defun my-app ()
    (setf *my-app* 
       :width 500
       :height 500))
    (mp:process-run-function "proroad" #'clim:run-frame-top-level *my-app*)))

This should allow to enter commands either by clicking them in the menu
or by typing them to the interactor. The problem is, after one command has 
been selected from the menu, you can't type anything to the interactor 
any more.

It works when I replace ":menu local" with ":command (com-test)", but in
our application there will be menus instead of simple commands. It even 
doesn't work with this single command in the menu.

Thanx for help.

Stefan Hegny
Forschungszentrum Informatik an der Universitaet Karlsruhe
Haid-und-Neu-Str. 10-12
D-76131 Karlsruhe




Main Index | Thread Index