mac@trantor.harris-atd.com (Mike McDonald) (04/23/89)
In my application, I'm trying to set a widgets arguments given a
string containing the ascii representation. (They user typed in the
value.) XtSetValues() doesn't do me any good since it wants the value
and not its printed representation. Using XtGetResourceList() and
XtConvert(), I can change the printed representation into the internal
format. This gives me a XrmValue back. Now, what do I do with it?
I can use bcopy() to copy the value into the widget. Unfortunetly,
this won't cause the widget's set_values() function to be run. Do
I have to duplicate all the code in XtSetValues() or is there a
routine that already does this? (Right now I have a kludge that casts
the XrmValue's address into either a char, short, int, or double and
uses XtSetArg on it.)
Mike McDonald
mac@trantor.harris-atd.com
postmaster@trantor.harris-atd.com
(407) 727-5060
Advanced Technology Dept.
Harris Corp.
M.S. 3A-1912
P.O. Box 37
Melbourne, Florida
32902kit@EXPO.LCS.MIT.EDU (Chris D. Peterson) (04/25/89)
[ trantor.harris-atd.com!mac@sdcsvax.ucsd.edu (Mike McDonald) writes: ] > In my application, I'm trying to set a widgets arguments given a > string containing the ascii representation. (They user typed in the > value.) XtSetValues() doesn't do me any good since it wants the value > and not its printed representation... Use XtConvert() to get the value in the right format then XtSetValues() to set the value into the widget. Chris D. Peterson MIT X Consortium