Path: utzoo!attcan!uunet!lll-winken!lll-tis!helios.ee.lbl.gov!pasteur!ucbvax!VIOLET.BERKELEY.EDU!rusty From: rusty@VIOLET.BERKELEY.EDU Newsgroups: comp.windows.x Subject: lack of return value from Xtconvert Message-ID: <8807150541.AA01273@violet.berkeley.edu> Date: 15 Jul 88 05:41:32 GMT Sender: daemon@ucbvax.BERKELEY.EDU Lines: 26 Someone posted a program "colordemo" that uses the X toolkit which makes a bunch of label widgets, one for each color in the rgb.txt file. I fixed it up to work with the rgb.txt file distributed with x11. On an 8 plane color display it works with the distributed rgb.txt file. On a 4 plane color display (uvax 2000) it runs out of color map entries. The problem is that the program uses XtConvert to convert from a color name to a pixel value: static Pixel stringToPixel(w, colorname) Widget w; String colorname; { XrmValue in, out; in.addr = colorname; in.size = strlen(colorname) + 1; XtConvert(w, XtRString, &in, XtRPixel, &out); return(*((Pixel *) out.addr)); } but XtConvert doesn't return anything, so the program has no way of knowing that the color map has been exhausted. Are there any plans to have XtConvert return something or am I just screwed?