montnaro@spyder.crd.ge.com (Skip Montanaro) (05/23/91)
Are there any known problems with XmStringGetLtoR on DECstations (Motif 1.1, DEC-supplied)? Assuming there is a valid text segment to be found, the following fragment of code will extract the labelString from a PushButton widget (for instance) on a Sun-4, but fails on a DECstation. char *variable = NULL; XmString str; Arg args[1]; XtSetArg(args[0], "labelString", (XtArgVal) &str); XtGetValues(pushbutton, args, 1); XmStringGetLtoR(str, XmSTRING_DEFAULT_CHARSET, &variable); Upon return from the call to XmStringGetLtoR(), variable has a value of 2. The function return value is 0. The code above is a paraphrase of what really happens. Here's a complete example, written in LYMB, our interpretive object-oriented language, that demonstrates the problem. The application displays a single XmPushButton widget with the label "Quit". Its activate callback exits the application. motif_push_button new: p parent=motif activate_action=`quit' @ `labelString' : `Quit' create! ; actions new: `quit' tick_actions=` motif exit!; ' ; motif on!; p @ `labelString' print: string_value; motif start!; -- Skip (montanaro@crdgw1.ge.com)