[comp.windows.x] Help with MenuPopup and MenuPopdown

sandra@arizona.edu (Sandy Miller) (06/06/89)

I am trying to use the translation actions MenuPopup and MenuPopdown in
an application I am designing.  According to the X Toolkit Intrinsics - C
Language Interface manual, "MenuPopup is known to the translation manager"
and "The Intrinsics register an action table for MenuPopup and MenuPopdown
as part of X Toolkit initialization."

However, when I use these names on the right-hand side of a translation
table, I get the following message when the window is mapped: 
"X Toolkit Warning: Actions not found: MenuPopup, MenuPopdown:

Can someone who has used these translation actions successfully tell me what
I am doing wrong?

Following are the pertinant code sections:

   static String translations = "\
      <Btn3Down>: MenuPopup(shellname)\n\
      <Btn3Up>:   MenuPopdown(shellname)\
   ";
	.
	.
	.
   trans_table = XtParseTranslationTable(translations);
	.
	.
	.
   XtOverrideTranslations(shell, trans_table);

Thank you for any help.

mcintyrd@cs.rpi.edu (David McIntyre) (06/06/89)

In article <11360@megaron.arizona.edu> sandra@arizona.edu (Sandy Miller) writes:
>I am trying to use the translation actions MenuPopup and MenuPopdown in
>an application I am designing.  According to the X Toolkit Intrinsics - C
>Language Interface manual, "MenuPopup is known to the translation manager"
>and "The Intrinsics register an action table for MenuPopup and MenuPopdown
>as part of X Toolkit initialization."
>
>However, when I use these names on the right-hand side of a translation
>table, I get the following message when the window is mapped: 
>"X Toolkit Warning: Actions not found: MenuPopup, MenuPopdown:


This is a known bug (at least to me).  Here is the bug report I
sent in to the exterminators:

SYNOPSIS:
    When using the new toolkit stuff (application contexts), the
    MenuPopup and MenuPopdown actions are not added.

DESCRIPTION:
   The problem appears to be that _XtPopupInitialize() calls
   XtAddActions() instead of XtAppAddActions().  This means that
   an application context does not get these two actions, and trying
   to call them results in an unknown action  error.

REPEAT BY:
    What I did to get the error:  I changed my application from using
    the R2 and before toolkit initialization to the new method
    of toolkit initialization and starting using application contexts.

SAMPLE FIX:
    I fixed it just by doing a XtAppAddActions(tmActions) on new
    application contexts, but that is just a quick fix.
Dave "mr question" McIntyre     |      "....say you're thinking about a plate
mcintyre@turing.cs.rpi.edu      |       of shrimp.....and someone says to 
office : 518-276-8633		|	you `plate,' or `shrimp'......"
home   : 518-271-6664		|