Parent document is top of "Motif FAQ (Part 6 of 9)"
Previous document is "185) How do popup menus work?"
Next document is "187) What are the known bugs in popup menus?"

186) Should I use translation tables or actions for popup menus?

[Last modified: August 92]

Answer:  The original goal of popupMenus was that the user would not have to
specify an event handler to manage popupMenus; however, that did not become
reality.  Larry Rogers wrote:

> There appear to be two ways to manage popup menus.  I
> am curious what the correct way would be:

> 1.  Change the translation table of the widget with the
>    popup child to popup the menu.  Note that this does
>    not currently working for many widgets, because aug-
>    menting their translations, even for augment breaks
>    the widget.

> 2.  Add an event handler at creation to the widget; then
>    determine if the event that caused the event handler
>    to be called is the current button being used by the
>    menu as its activation button.

Susan Murdock Thompson (from OSF) replied:  *Theoretically, you should be able
to do both.*  Our documentation says use event handlers.  Our tests for the
toolkit use event handlers and for UIL use translations.  (Although I tried an
event handler with a UIL test and it works).

Parent document is top of "Motif FAQ (Part 6 of 9)"
Previous document is "185) How do popup menus work?"
Next document is "187) What are the known bugs in popup menus?"