CLIM mail archive

[Prev][Next][Index][Thread]

problems with menus and interactors



Hi,

we are having a little problem with menu-bars and
interaction-panes.

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
				  global)
		   :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 ()
  (progn
    (setf *my-app* 
      (clim:make-application-frame 
       'pipapo
       :width 500
       :height 500))
    #+allegro
    (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

mail: hegny@fzi.de





 
     



Follow-Ups:

Main Index | Thread Index