Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!think.com!zaphod.mps.ohio-state.edu!cis.ohio-state.edu!ucbvax!agate!dog.ee.lbl.gov!rubato!anderson From: anderson@rubato.lbl.gov Newsgroups: comp.windows.x.motif Subject: writing Widgets with Float resources Message-ID: <13743@dog.ee.lbl.gov> Date: 30 May 91 23:05:02 GMT Reply-To: anderson@rubato.lbl.gov () Organization: Lawrence Berkeley Laboratory, Berkeley CA Lines: 31 X-Local-Date: Thu, 30 May 91 16:05:02 PDT I have started to write a few Motif widgets (subclassing Primitive, for instance), and have things working fine as long as various resources are "ints" (XmRInt type resources). But I need them to be "floats" (XmRFloat types). It appears that no matter what I try, XtSetValues passes junk as the float; as soon as I get into my SetValues function and take a look at what is passed, I get some bizarre value. This does not occur when the resource file is read and values are assigned - from the resource file everything is fine; only when I do the XtSetValues programmatically do I have this trouble... I've searched all the commercial and PD widgets out there that I have had access to, and no one seems to have a working example. I don't want to have to pass it in as a string... My development environment is X11R4 and Motif 1.1 from DEC on a DECstation 5000. Has anyone successfully created a widget of their own using some float resources? I find it a bit odd that even OSF doesn't seem to have any. Thanks for any help or advice you can lend. Mark Anderson anderson@rubato.lbl.gov anderson@rhea.aps.anl.gov