CLIM mail archive
Re: Menu Question
>Date: Thu, 2 Dec 1993 18:00 -0500
>From: Scott McKay <SWM@stony-brook.scrc.symbolics.com>
>Subject: Menu Question
> From: Nichael Cramer <ncramer@BBN.COM>
> This is almost surely a FAQ, but...
> Is there some way I can invoke the motif-ish menus --i.e. the menus I get
> when I click-right on presentation-action-- in some other context?
> All other calls to a menu result in the standard clim-like menus (including
> when I try to reproduce what I find on the stack when I break in the middle
> of a right-button menu).
> (Ideally I would like to hand it the contents of a command-table, but
> invoked in some other context than a right-click.)
>I believe that the method for FRAME-MANAGER-MENU-CHOOSE for the
>Allegro Motif back-end looks at what the various arguments that have
>been provided to MENU-CHOOSE are. If it decides that the call to
>MENU-CHOOSE is "too hairy" to use a Motif menu, it falls back to using
>the more flexible CLIM menus. What are the arguments you are passing
The first thing I tried was a call to
MENU-CHOOSE-COMMAND-FROM-COMMAND-TABLE (which resulted in the clim-ish
menus). So apparently the contents there are too complicated.
I then went into the stack that resulted from invoking the regular
right-click menu. From there I got the arguments that it hands to
MENU-CHOOSE. When I tried calling this myself, the menu came up, but
contained gibberish (which led me to believe that I wasn't invoking the
call in the correct context).
Any way, following your hint above I tried a very simple call of the form
(MENU-CHOOSE '("CAT" "DOG" "FROG") :associated-window MY-PANE) and I got
the menu I wanted.
Now what I'm doing is getting the stuff that I need out the command-table
and constructing my own (very simple) item-list for MENU-CHOOSE. A bit
ham-handed, but more than sufficient for my specific needs.
Thanks. Apparently I just needed a nudge in the right direction.
Main Index |