CLIM mail archive

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

re: changing command tables



re:
    (2)  and so I tried using a hierarchy of command tables.  However, I have
    not found a way to switch between command tables in my application.
    The display-command-menu function will display the command table that
    is defined in the :command-table parameter of the define-application-frame
    macro.  But I cannot seem to define my own display function that uses
    a different command table depending on application state.

    Are separate command tables intended to be used in this way?
    How does one switch between command tables in CLIM?

Another rather abstruse method of switching command tables and having
it reflected in the command menu is to define multiple layouts which
look relatively similar (i.e., both use the command menu), tell the
top-level that you're switching command tables, and then explicitly
switch layouts which updates the menu options... Possibly you can get
away with switching layout to the same layout you started with...
   For example:
    
   (setf (clim:frame-command-table *my-app*) 
         (clim:find-command-table 'table1))
   (clim:set-frame-layout *my-app* 'layout1)))

                   -- Greg

0,,


Main Index | Thread Index