[comp.windows.x] Popping up using Xtk

nosmo@vision.ucsb.edu (Vincent Brooke Kraemer) (09/15/88)

I am currently trying to implement a simple popup menu, using the
X Toolkit and the Athena widget set.

The outline of what I've done is as follows:
   1. XtInitialize the application - calling it toplevel
   2. XtCreatePopupShell an overrideShell, with toplevel as
      its parent.
   3. XtCreateWidget a dialogWidget as the child of the
      popup create before it.
   4. XtCreateManagedWidget some other widgets as children
      of the dialogWidget.

All of this executes fine -- until I attempt to popup the menu.
The following error is issued then:

X Protocool error detected by server: integer parameter out of range
  Failed request major op code 1 X_CreateWindow
  Failed request minor op code 0
  ResourceID 0x0 in failed request
  Serial number of failed request 43
  Current serial number in output stream 53

Any help with this would be appreciated.
Ta,
Vince

swick@athena.mit.EDU (Ralph R. Swick) (09/15/88)

>    2. XtCreatePopupShell an overrideShell, with toplevel as
>       its parent.
>    3. XtCreateWidget a dialogWidget as the child of the
>       popup create before it.
...
> X Protocool error detected by server: integer parameter out of range
>   Failed request major op code 1 X_CreateWindow
>   Failed request minor op code 0
>   ResourceID 0x0 in failed request

This error has most frequently meant that one of your widgets
has zero width or height.  If your scenario is exactly as you
describe, then your popup shell has no managed child and may
be the culprit.  The easiest way to isolate the problem widget
is to set a breakpoint in the error handler and run with the
-synchronous argument.  (In MIT Xlibs, the default error handler
is _XError, but this is _not_ part of the spec).  The Realize
method that is on the top of the stack will give you the
CreateWindow request that is failing.