CLIM mail archive

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

Problem: switching of command-table-menus



I have a problem with switching of command-tables
in CLIM 2.0 beta (Lucid, Sun sparc).

Sorry if this is a FAQ, I did not find anything about it
 in my saved mail.

In short, switching of command tables does nothing.

----- longer description -------------------

I defined an application-frame with its command-table "browser-window"
and eight commands.

I defined another command-table inheriting from the first one.
I ensured inheritance of menu entries manually by the form:

(clim:make-command-table 'lattice-browser :inherit-from '(browser-window)
  :errorp nil
  :menu (let ((result nil))
          (clim:map-over-command-table-menu-items 
           #'(lambda (&rest x) 
               (push (list (first x) (first (third x)) (second (third x))) 
result))
           (clim:find-command-table 'browser-window))
          (nreverse result)))		   

Then I added two additional commands to this. 

I verified with the inspector, that the menu of the new
comtab contains ten menu items (all with the same
data structure, the correct contents).

But when I switch the comtab of an app.-frame, either
in its :initialize-after OR in a command, by using
(setf frame-command-table), nothing happens. Only
the menu entries of the root comtab appear.
But the reader method frame-command-table gives the
name of the second, inheriting comtab!
Switching several times, manual refresh etc. change nothing.

What am I doing wrong here?

Finally I defined my own display-function for the
command-menu-pane, this worked(!!!):

(defun draw-menu-coms (frame stream &rest rest)
  (declare (ignore rest))
  (clim:display-command-table-menu (clim:frame-command-table frame) stream))

But shouldn't this be the default anyway?




Main Index | Thread Index