Article View: comp.windows.x
Article #37698XtCreateManagedWidget blues
From: Matthew.Diamond
Date: Mon, 05 Mar 1990 17:44
Date: Mon, 05 Mar 1990 17:44
35 lines
1827 bytes
1827 bytes
Here is what could be a simple problem (but I'm not sure).
I have a piece of code which creates a unique name, then creates a
form widget with that name.
...
n = 0;
XtSetArg(args[n], XtNheight, 10); n++;
XtSetArg(args[n], XtNwidth, 10); n++;
varWidget = XtCreateManagedWidget(uniquename, formWidgetClass, myboxwidget,
args, n);
...
The first time I do this everything works, I add some child widgets later
and things are great. Then I unmanage varWidget and go back to create a new
form widget, calling the same code (but the unique name is different).
Once I've called XtCreateManagedWidget this second time, and not before,
I'll get the following error when I enter an event loop:
X Protocol error: not a valid window ID
Major opcode of failed request: 8 (X_MapWindow)
Minor opcode of failed request: 0
Resource id in failed request: 0x0
Serial number of failed request: 409
Current serial number in output stream: 411
The only difference I can think of between the first and second time this
code is called is that the parent widget (myboxwidget) is not yet mapped
the first time, but is the second time. That shouldn't make a difference...
should it?
This is running in R3, on a microVax with a 4-bit (monochrome) display.
I welcome any suggestions, no matter how stupid they make me feel.
Matthew Diamond
matt@maps.cs.cmu.edu
Technical Details
Message-ID:
<9003051747.AA03308@ATHENA.MIT.EDU>Path:
arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!cs.utexas.edu!usc!snorkelwacker!bloom-beacon!MAPS.CS.CMU.EDU!Matthew.DiamondShow Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!cs.utexas.edu!usc!snorkelwacker!bloom-beacon!MAPS.CS.CMU.EDU!Matthew.Diamond From: Matthew.Diamond@MAPS.CS.CMU.EDU Newsgroups: comp.windows.x Subject: XtCreateManagedWidget blues Message-ID: <9003051747.AA03308@ATHENA.MIT.EDU> Date: 5 Mar 90 17:44:31 GMT Sender: daemon@athena.mit.edu (Mr Background) Organization: The Internet Lines: 35