Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!ames!elroy!cit-vax!tybalt.caltech.edu!uhley From: uhley@tybalt.caltech.edu (John Uhley) Newsgroups: comp.windows.x Subject: Help on Resource Conversion anyone? Message-ID: <9499@cit-vax.Caltech.Edu> Date: 11 Feb 89 00:23:04 GMT Sender: news@cit-vax.Caltech.Edu Reply-To: uhley@tybalt.caltech.edu (John Uhley) Organization: California Institute of Technology Lines: 27 I'd like to be able to specify a floating point resource and use XtSetArg to modify it on the creation of a widget. Thus: { XtSomeResource, XtCSOMETHING, XtRFloat, sizeof(float), XtOffSet(Widget, thing.floating_field), XtRFloat, (caddr_t)&def_float} is my resource and I want to be able to say: XtSetArg(arg[n], XtSomeResource, 1.00); n++; XtCreateManagedWidget(..., arg, n); and have my "thing.floating_field" field set to "1.00" I've tried adding a class_init routine which does an XtAddConverter(XtRFloat, XtRFloat, CvtFloatToFloat, NULL, 0); but although this gets called, CvtFloatToFloat (which I've written) is NEVER called. Anyone have a clue as to what I've done wrong? Thanks, John uhley@tybalt.caltech.edu