Re: X extensions bug

Guido.van.Rossum@cwi.nl
Wed, 15 Jun 1994 15:10:45 +0200

> I've tried using the Extension/X11 with python 1.0.2 on a Decstation/Ultrix
> with X11R4, Motif 1.1.
>
> I get lots of the following type of warnings:
>
> > xpython tdialog.py
> X Toolkit Warning:
> Name: aap
> Class: XmLabel
> Invalid XmNlabelString - must be a compound string
[...]
> I traced this happening in XtSetValues() call.
> I wonder if this is the documented bug in README:
>
> Bugs:
> - When using Motif 1.1 and X11 R4 on SGI, I found that Motif
> compound strings (XmString) don't work. You can avoid them,
> or use X11 R5, or ...?
>
> If this is the same bug, can anybody fill in the ...? part?

I think the following quote from email I received from Adrian Phillips
applies (I got it privately and still haven't found the time to
integrate all bug fixes to the X11 interface -- shame on me!).

| I checked out Wafe to see what it did with XtConvertAndStore,
| etc. and it uses XtConvert. I tried this and it worked. You can
| remove all those hacks I gave you as they are now replaced by a four
| line change in python_to_res [...]:
|
| out.size = 0;
| out.addr = 0;
| #ifdef SCREWED_CONVERTANDSTORE
| XtConvert(w, typename, &in, ctype, &out);
| if (!out.addr) {
| #else
| if (!XtConvertAndStore(w, typename, &in, ctype, &out)) {
| #endif
| err_setstr(Xt_Error, "can't convert resource type");
| return 0;
| }

Note that in fact you don't need the #ifdef -- the code using
XtConvert always works as far as I can tell. Let me know if this
helps or not.

--Guido van Rossum, CWI, Amsterdam <Guido.van.Rossum@cwi.nl>
URL: <http://www.cwi.nl/cwi/people/Guido.van.Rossum.html>