Path: utzoo!mnetor!tmsoft!torsqnt!news-server.csri.toronto.edu!cs.utexas.edu!swrinde!ucsd!ucbvax!pasteur!dent!davidh From: davidh@dent.Berkeley.EDU (David S. Harrison) Newsgroups: comp.windows.x Subject: Problem with X11R4 Xt Toolkit function XtVaCreateManagedWidget() Keywords: Xt, Toolkit Message-ID: <25279@pasteur.Berkeley.EDU> Date: 25 May 90 19:53:01 GMT Sender: news@pasteur.Berkeley.EDU Reply-To: davidh@dent.Berkeley.EDU (David S. Harrison) Followup-To: comp.windows.x Organization: UC Berkeley Computer Aided Design Lines: 35 I have run into a minor problem with the X toolkit and the Athena Widget set under X11R4. I was using the new XtVaCreateManagedWidget() function to create a new label widget. Below is the call that caused problems: item->checkLabels[i] = XtVaCreateManagedWidget(DDS_ILEXLBL_NAME, labelWidgetClass, item->bodyTable, XtNlabel, item->user_spec.items[i].label, XtNjustify, XtJustifyLeft, NULL); When I set certain (non-label widget) resources in my ~/.Xdefaults file, this call will free the string I pass in the XtNlabel slot. Looking at Xt create widget code, it appears the VarArgs code thinks my passed parameter is a XtVaTypedArg even though there is nothing in the call to tell it to do so. If I remove the offending resources, the string isn't freed. Further, if I change the order of the parameters, it also seems to work, i.e.: item->checkLabels[i] = XtVaCreateManagedWidget(DDS_ILEXLBL_NAME, labelWidgetClass, item->bodyTable, XtNjustify, XtJustifyLeft, XtNlabel, item->user_spec.items[i].label, NULL); Unfortunately, I can't fully track down the problem because our libraries are not installed for debugging. Have I overlooked something in resource management or variable argument list semantics or is this a bug? David Harrison UC Berkeley Electronics Research Lab (davidh@ic.Berkeley.EDU, ...!ucbvax!ucbcad!davidh)