Path: utzoo!attcan!utgpu!jarvis.csri.toronto.edu!mailrus!husc6!purdue!decwrl!asente From: asente@decwrl.dec.com (Paul Asente) Newsgroups: comp.windows.x Subject: Re: XtConvert Message-ID: <1600@bacchus.dec.com> Date: 20 Jul 89 17:18:11 GMT References: <1208@quintus.UUCP> Organization: DEC Western Software Lab Lines: 27 In article <1208@quintus.UUCP> pds@quintus.UUCP (Peter Schachte) writes: >The (R3) doc for XtConvert() says it takes a widget argument which >"specifies the widget to use for additional arguments (if any are >needed)." What does this mean? What extra arguments? Some conversions need more information than just the source value. String to font, for example, needs the display connection to fetch the font from and string to pixel needs a display and a colormap. These extra convert arguments are extracted from the widget you pass to XtConvert. >I'm trying to convert strings to the appropriate argument types to be >put into the ArgList to be passed to XtCreateWidget() or >XtAppCreateShell(), so I don't have a widget yet to pass to XtConvert(). >Can I pass it a NULL? No. When creating a widget the right thing is usually to pass in some other widget on the same display, usually the new widget's parent. If you're creating the very first widget in the application you can't do conversions; create the widget then use XtSetValues. >Or is there some way I can find the appropriate >resource converter myself so I can call XtDirectConvert()? Nope. -paul asente asente@decwrl.dec.com decwrl!asente