Path: utzoo!utgpu!watmath!clyde!att!osu-cis!tut.cis.ohio-state.edu!mailrus!cornell!uw-beaver!uw-june!uw-entropy!bill From: bill@entropy.ms.washington.edu (Bill Dunlap) Newsgroups: comp.windows.x Subject: chaining resource converters Message-ID: <1057@entropy.ms.washington.edu> Date: 13 Nov 88 20:31:15 GMT Reply-To: bill@elk.stat.washington.edu (Bill Dunlap) Distribution: na Organization: UW MathStat, Seattle Lines: 18 I would like to write a resource converter to convert a String to a ColormapSegment. The String will be a list of color names. It seems reasonable to run through the list of color names and pass each to CvtStringToPixel. However, that is static to lib/Xt/Converters.c. If I use XtConvert I must supply a widget but I have no widget to supply when I register the converter (while in ClassInitialize()). If I use XtDirectConvert I need access to CvtStringToPixel. What is the best way to do this? A side issue concerns allocating space for the ColormapSegment. Its length is unknown at compile time so I must XtMalloc() space for it. Is there a conventional way to tell a widget that it must free space allocated by a resource converter or for the widget to tell the conversion mechanism that it is done with a resource? Bill Dunlap Dept. of Statistics, U. of Washington, Seattle bill@elk.stat.washington.edu