manu@orc.olivetti.com (07/13/90)
I have a dialog widget. I use it for various purpose. Before I pop it up, I would like to change it's default value using XtSetValues(). It doesn't work. I am using R3. Here is my code. void changeDlgValue(dlgW,value) Widget dlgW; /* dialog widget */ String value; { Arg args[1]; XtSetArg(args[0], XtNvalue, value); XtSetValues(dlgW, args, 1); } I get a segmentation fault. I also tried this: static changeDlgValue(dlgW,value) Widget dlgW; String value; { Arg args[1]; Widget valueW; valueW = XtNameToWidget(dlgW,"value"); MakeArg(XtNstring,(XtArgVal)value); XtSetValues(valueW, args, 1); } Here I get a toolkit error, someting like, XtSetValues for XtNstring resource is not supported for assciStringWidgetClass! Is there a way to it? By the way, I can change the label of the dialog box widget using the above technique without problem. Any help will be appeciated. Thanks, manu