The  program below workis fine in Unix, but I get a BadWindow error when
running on Linux RedHat 6.2.
Could you help me?
Regards

Giovanni Colombo
ENEL.HYDRO
Business Unit Polo Idraulico e Strutturale
Via Pozzobonelli, 6 - 20162 Milano (Italy)
Tel: +39 02 7224.3649
Fax: +39 02 7224.3550
Mailto:[EMAIL PROTECTED]

-----------------------------------------------------------------------
#include <stdio.h>
#include <X11/Xlib.h>
#include <X11/Intrinsic.h>
#include <X11/StringDefs.h>
#include <Xm/Label.h>

Arg args[] = {
  XtNlabel, (XtArgVal) "Stuff",
};

main(argc, argv)
int argc;
char **argv;
{
  Widget toplevel, wlabel;
  WidgetClass wc;
  int i;

  toplevel = XtInitialize(argv[0], "my-widget", NULL, 0, &argc, argv);
  wc = xmLabelWidgetClass;

  i=0; 
  wlabel = XtCreateWidget("mylabel",
            wc,
            toplevel,
            args,
            i);

  fprintf(stderr, "status of creating label widget %d\n", wlabel);

  XtRealizeWidget(toplevel);
  XtMainLoop();
}


*************Compiled & linked using gcc version 3.0:
gcc -o mytest mytest.c  /usr/X11R6/lib/libXt.so.6
/usr/X11R6/lib/libXm.so.2.1 -L/usr/X11R6/lib -lX11

*************Executing, got the error:

X Error of failed request:  BadWindow (invalid Window parameter)
  Major opcode of failed request:  19 (X_DeleteProperty)
  Resource id in failed request:  0x0
  Serial number of failed request:  92
  Current serial number in output stream:  98

-----------------------------------------------------------------------


_______________________________________________
Xpert mailing list
[EMAIL PROTECTED]
http://XFree86.Org/mailman/listinfo/xpert

Reply via email to