dce@smsc.sony.com (David Elliott) (02/14/91)
Can anyone hazard a guess as to why the XmForm class doesn't install a String to Window converter? As one who prefers to keep as much data in the resource files as possible, I decided to install one myself in my programs. The following routine, snagged from the Athena Form widget code, does a fine job. #include <X11/Intrinsic.h> #include <Xm/Xm.h> #include <X11/Xmu/Converters.h> #include <X11/IntrinsicP.h> #include <X11/CoreP.h> void setupConverters() { static XtConvertArgRec parentCvtArgs[] = { {XtBaseOffset, (caddr_t)XtOffset(Widget, core.parent), sizeof(Widget)} }; XtAddConverter(XmRString, XmRWindow, XmuCvtStringToWidget, parentCvtArgs, XtNumber(parentCvtArgs)); }