grunwald@FOOBAR.COLORADO.EDU (Dirk Grunwald) (12/12/89)
How does one pass a float value to an RFloat converter, e.g. like the one in Scroll.h? If I pass a floating point number in XtSetArg, it doesn't work. Is there a way to specify the argument type to XtSetArg? I'd like to be able to e.g. pass a string and have it parsed by the converter. I can do this in the resource file, but would like to specify a value in a program (from a variable). Dirk Grunwald -- Univ. of Colorado at Boulder (grunwald@foobar.colorado.edu) (grunwald@boulder.colorado.edu)
swick@ATHENA.MIT.EDU (Ralph R. Swick) (12/12/89)
Date: Mon, 11 Dec 89 17:04:28 -0700 From: Dirk Grunwald <grunwald@FOOBAR.COLORADO.EDU> If I pass a floating point number in XtSetArg, it doesn't work. Yes, it will; but you have to jump through hoops to get the C compiler to refrain from doing the courtesy of coercing your float to an int. The best way we've been able to figure out to do this is with a union containing a float and a long. I'd like to be able to e.g. pass a string and have it parsed by the converter. You'll be able to do this with an R4-compliant Xt via a new additional set of interfaces.