Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!usc!wuarchive!mit-eddie!bu.edu!polygen!jerry From: jerry@polygen.uucp (Jerry Sheckel) Newsgroups: comp.windows.x Subject: XmString Question Message-ID: <917@stewart.UUCP> Date: 3 Dec 90 20:31:12 GMT References: <502@zok.UUCP> Reply-To: jerry@stewart.UUCP (Jerry Shekhel) Organization: Polygen Corporation, Waltham, MA Lines: 27 Hello. I'm developing my first Motif application, and I have a question about XmString things. This is the situation: I need to obtain the labelString resource from a pushbutton and use it to set the string resource of another widget: Widget w1, w2; XmString str; Arg arg; XtSetArg(arg, XmNlabelString, &str); XtGetValues(w1, &arg, 1); XtSetArg(arg, XmNmessageString /* or whatever */, str); XtSetValues(w2, &arg, 1); This seems to work. My question: does 'str' have to be deallocated at this point? That is, did XtGetValues() create an entire new instance of the XmString? Does XtSetValues() create an internal instance of the XmString, or does it just set up pointers to 'str'? Please help if you can. -- +-------------------+----------------------+---------------------------------+ | JERRY J. SHEKHEL | POLYGEN CORPORATION | When I was young, I had to walk | | Drummers do it... | Waltham, MA USA | to school and back every day -- | | ... In rhythm! | (617) 890-2175 | 20 miles, uphill both ways. | +-------------------+----------------------+---------------------------------+ | ...! [ princeton mit-eddie bu sunne ] !polygen!jerry | | jerry@polygen.com | +----------------------------------------------------------------------------+