Path: utzoo!attcan!uunet!aspect!jeff From: jeff@aspect.UUCP (Jeff Rosler) Newsgroups: comp.windows.x Subject: Re: Registered Actions coupled with KeyBoard Focus Keywords: translations Message-ID: <2893@aspect.UUCP> Date: 17 Jul 90 15:19:21 GMT Organization: Aspect Telecommunications, San Jose, Ca Lines: 50 I tried to email this directly, but it bounced, so here it is. >... > > mpost*TExttWidget.translations: F1 : Zoomin() > where TexttWidget is the name of the text widget. I use XtAddActions to >register thezoomin action with toolkit. >Now the problem : When I use translations in defaults file it overwrites(or >seems to override)the default translations that are in the text widget. >Therefore resulting in that I cannot type in any letter in the text widget, >with or without keyboard focus on. If I comment out the line in the defaults >file every thing seems to be fine. Is there a way that both translations >can live side by side. In other words augment the translations. Or is there another >way to achieve the same thing. Well, the translations resource is specified in the Core widget class, so I would say this problem can happen in multiple widget toolkits (at least those that are X Intrinsics based). Your problem is that you did not specify a directive in the translation table. If no directive is specified #replace is used. This replaces your translation table with the default one. You probably want to use #override. This tells the widget to merge the new translations into the current translation table and replace any old values where there is a conflict. So, you might change your specification from > mpost*TExttWidget.translations: F1 : Zoomin() to mpost*TExttWidget.translations: #override\ F1 : Zoomin() This should clear up your problem. Translations are explained in detail in "X Toolkit Intrinsics Programming Manual". This is Volume 4 of the O'Reilly & Associates X Window series (ISBN 0-937175-34-X). I highly recommend this book as well as the entire series. Have fun! Jeff Rosler Aspect Telecommunications 1730 Fox Drive San Jose, CA 95131-2312 uunet!aspect!jeff (408) 441-2420