[comp.windows.x] Why doesn't this work?

jkh@pcsbst.UUCP (Jordan K. Hubbard) (02/17/89)

text_widget = some ascii text widget

	int i, len;
	static Arg args[10];

	i = 0;
	XtSetArg(args[i], XtNlength, &len); i++;

	XtGetValues(text_widget, args, i);

len is left set to garbage.. Now on page 25 of the X Toolkit Intrinsics
manual, a short "Note" is given that XtNeditType, XtNfile, XtNlength
and XtNfont cannot be used with "XtTextSetValues" and "XtTextGetValues"
calls. Does this catagory include XtGetValues as well? How is one expected
to get the length (maximum or current) of an ascii text widget? They're *not*
null terminated. Currently, I'm forced to use this botch:

     /* ack pflt yak barf */
     XtTextSetInsertionPoint(text_widget, SOME_HUGE_NUMBER);
     len = XtTextGetInsertionPoint(Input);

Please widget gods, tell me there's a better way.

					Jordan Hubbard
					PCS Computer Systems
					pyramid!pcsbst!jkh