CLIM mail archive


Menu item inheritance in command tables

I am implementing a system which has two layouts.  The two layouts have some
commands in common, but others are different.  So, I've defined separate 
command tables for the two.  I then defined a parent command table that 
contains the common commands and the other two command tables inherit from this
parent command table.  So far, so good.

The problem is that the menus for the two interfaces do not display the items
from the parent command table.  I searched back in my archives of this list and
found this subject discussed before.  It seems that an implementation decision
was made that menu items should not be inherited in command tables, because
the implementers felt that this was wrong for most cases.  This may be true, 
but for my case, it is not wrong.  

I can solve the problem by using add-menu-item-to-command-table to add menu
items to the child command tables for each common command.  Since my 
requirements are quite simple, this isn't to bad.  However, if someone had 
many levels of inheritance or many inherited commands, this technique would 
soon grow quite unwieldy.

Would it be possible/desirable to add a keyword argument somewhere to allow 
this type of functionality?  Something along the lines of the :inherited 
keyword to map-over-command-table-commands would do nicely.

Any comments?  Also, does anyone have a better approach?  I considered 
defining two different versions of the common commands, but decided against it.
It wouldn't be too hard to return to that technique, if someone has convincing
arguments that things should be done that way.


Randy A. Coulman                |       ARIES Laboratory
                                |       Department of Computational Science             |       University of Saskatchewan
                                |       Saskatoon, SK   S7N 0W0             


Main Index | Thread Index