Newsgroups: comp.windows.x Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!ispd-newsserver!ism.isc.com!ico!auto-trol!marbru From: marbru@auto-trol.com (Martin Brunecky) Subject: Re: Restoring a widget's default translations Message-ID: <1991Apr24.145724.14497@auto-trol.com> Reply-To: marbru@auto-trol.UUCP (Martin Brunecky) Organization: Auto-trol Technology, Denver References: <9104191458.AA10004@excess.lcs.mit.edu> <1991Apr21.231152.26500@bellcore.bellcore.com> Date: Wed, 24 Apr 1991 14:57:24 GMT In article <1991Apr21.231152.26500@bellcore.bellcore.com> aw@bae.bellcore.com writes: >In article <9104191458.AA10004@excess.lcs.mit.edu>, converse@expo.lcs.mit.EDU (Donna Converse) writes: >> >> Yes, you can do XtGetValues on the translations resource of a widget, >> save the returned value, and later use XtSetValues to restore those >> translations on that widget. These translations might include >> translations specified by the user or by the application writer. > >Is this supported by Xt? When you do an XtGetValues on a widgets >translations, you get a pointer to private internal widget data. >Is pointed to data guaranteed to be valid beyond the next call to >an Xt function? > Just wondering... If the translations I am getting (XtGetValue) went through the resource conversion mechanism, the parsed translations are cached, so the (opaque) handle I get remains valid forever. However, if the translations I am getting is something set by the application or some other widget, I am not quite so sure. On the other hand, all the (opaque) translation handles are "created" by XtParseTranslations (XtOverrideTranslations....). Do those call "cache" the translation structure(s) so that the (opaque) translations handle is always VALID ? (I don't see any XtFreeTranslations call -). -- =*= Opinions presented here are solely of my own and not those of Auto-trol =*= Martin Brunecky marbru%auto-trol@sunpeaks.central.sun.com (303) 252-2499 (better avoid: marbru@auto-trol.COM ) Auto-trol Technology Corp. 12500 North Washington St., Denver, CO 80241-2404