Path: utzoo!censor!geac!jtsv16!uunet!seismo!ukma!rex!samsung!brutus.cs.uiuc.edu!usc!snorkelwacker!bloom-beacon!ATHENA.MIT.EDU!swick From: swick@ATHENA.MIT.EDU (Ralph R. Swick) Newsgroups: comp.windows.x Subject: Re: Translation Table Mgmt Part II Message-ID: <8911131329.AA24033@LYRE.MIT.EDU> Date: 13 Nov 89 13:29:30 GMT References: <5891@merlin.usc.edu> Sender: daemon@bloom-beacon.MIT.EDU Organization: DEC/MIT Project Athena Lines: 30 > 1. How do I set tm_table to my default translation table? Assuming you are the writer of the widget class, then you assign the (String) pointer either in the static class record declaration or in the class_initialize procedure. If you aren't the widget class writer, then you shouldn't be changing this field (but if you do, do it before the class_part_initialize stage :-). > 2. Why can't I get the following to work? XtSetValues will not do type conversion; defaultTextTranslations is of type char[], and the XtNtranslations resource is of type XtTranslations. You'll have to do the conversion explicitly; in this case by calling XtParseTranslationTable (which is merely a short-hand for a more tedious XtConvert call). > I should not have to redefine it?? defaultTextTranslations is not actually declared in any of the Xaw header files, so you at least need to declare it to let the compiler know what to do. > if I do, how should > I load both tables in the beginning? You should specify your own table beginning with "#override" or "#augment", as appropriate and declare it as the value of the .translations resource in your app-defaults file. Xt will merge your own table with the Text widget default table automatically.