Path: utzoo!attcan!uunet!mcsun!unido!tub!net From: net@tub.UUCP (Oliver Laumann) Newsgroups: comp.windows.x Subject: XtConvert() again Message-ID: <962@tub.UUCP> Date: 24 Sep 89 14:00:09 GMT Reply-To: net@tub.UUCP (Oliver Laumann) Organization: Technical University of Berlin, Germany Lines: 19 Another question about the usage of XtConvert(). I don't quite understand how the result of a call to XtConvert() (a caddr_t) can be placed into an argument to e.g. XtSetValues(). Something like XtSetArg (args[n], XtNsomething, *(XtArgVal *)result.addr); (where result is an XrmValue the address of which has been passed to XtConvert() as the to_return argument) or simply XtSetArg (args[n], XtNsomething, *result.addr); doesn't work in all cases, e.g. when result.addr == 1 (when the result of the conversion is an unsigned char, for instance). Do I really have to write a switch statement with one case for each possible destination type (like the ugly switch in CopyFromArg() in lib/Xt/Resources.c)? Regards, -- Oliver Laumann net@TUB.BITNET net@tub.UUCP