Path: utzoo!attcan!uunet!lll-winken!lll-tis!helios.ee.lbl.gov!pasteur!cory.Berkeley.EDU!dheller From: dheller@cory.Berkeley.EDU (Dan Heller) Newsgroups: comp.windows.x Subject: XtAddActions/XtOverrideTranslations Keywords: Changing event handling for widgets.. Message-ID: <4495@pasteur.Berkeley.Edu> Date: 15 Jul 88 22:51:14 GMT Sender: news@pasteur.Berkeley.Edu Reply-To: dheller@cory.Berkeley.EDU (Dan Heller) Lines: 24 A collegue and I are trying to force a middle button event on a widget to go to a specific routine. So, we stumbled thru some of the vague documentation on pages 91 and 92 of the X Toolkit Intrinsics to try to figure out how to do this. The Doc says to use XtOverrideTranslations() to merge in our new translation table. But of course, it didn't tell us that we needed to call something else in order for these translations to be recognized. We figured that we should call XtAddActions() first to register actions that we were going to reference when trying to merge our new translation table in. Finally, we got no more error messages, but the new event wasn't registered. We tried all kinds of widgets -- label widgets, command widgets, and even one of my own. It doesn't seem like the type of widget should matter, but I tried a few anyway just in case... We finally worked around the problem by calling XtAddEventHandler() to register the actions and events desired and it worked fine. Can someone tell me what we could have done to get the new translation table working correctly? Dan Heller