jordan@zooks.ads.com (Jordan Hayes) (09/02/88)
Am I missing something really stupid here?
----- excerpt
#define LEN 30
char *string;
string = XtMalloc(LEN);
strcpy(string, "A Bunch Of Words In A String");
n = 0;
XtSetArg(args[n], XtNstring, (XtArgVal)string); n++;
XtSetArg(args[n], XtNlength, (XtArgVal)LEN); n++;
text = XtCreateManagedWidget("Text",
asciiStringWidgetClass, form, args, n);
-----
Shouldn't I be able to say
strcpy(string, "Foo Bar");
XtTextDisplay(text);
???
When I do this, I get the NULL at the end of the string turned into a
printable ^@ if the new string is shorter than the old string, and I
only get the old length if the new string is longer than the old one ...
/jordan
ps: Where can I get the patches for Xaw/Xt ?