Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!usc!cs.utexas.edu!rutgers!bellcore!jello!aw From: aw@jello.bae.bellcore.com (Andrew Wason) Newsgroups: comp.windows.x Subject: Re: Restoring a widget's default translations Message-ID: <1991Apr21.231152.26500@bellcore.bellcore.com> Date: 21 Apr 91 23:11:52 GMT References: <9104191458.AA10004@excess.lcs.mit.edu> Sender: usenet@bellcore.bellcore.com (Poster of News) Reply-To: aw@bae.bellcore.com Organization: Bell Communications Research Lines: 27 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? Both xmh and an earlier release of xrn do this (XtGetValues on XtNtranslations, save the result, XtSetValues with it later). As a result they both occasionally core dump. I was never sure if this was due to a bug in Xt, or if it was because this is unsupported behavior. So, is it OK to do this but it just doesn't work because of an Xt bug? Andrew _______________________________________________________________________________ Andrew Wason Bell Communications Research aw@bae.bellcore.com Piscataway, NJ bellcore!bae!aw