Path: utzoo!utgpu!jarvis.csri.toronto.edu!rutgers!apple!bbn!husc6!bunny!xg00 From: xg00@GTE.COM (Xev Gittler) Newsgroups: comp.windows.x Subject: XtAppCreateShell. What am I doing wrong? Message-ID: <6979@bunny.GTE.COM> Date: 25 May 89 17:42:51 GMT Organization: GTE Laboratories, Inc., Waltham, MA Lines: 51 Could someone perhaps tell me what I am doing wrong? Reading the documentation on XtAppCreateShell, this seems to be what I am supposed to do, but it is not working. I keep getting an X Toolkit Error: Cannot perform malloc The following is the code. It gets the error on the XtAppCreateShell command. If anyone can help me out, I would REALLY appreciate it! Xev Gittler xg00@gte.com, or xg00%gte.com@relay.cs.net #include #include #include #include main(argc,argv) int argc; char *argv[]; { XtAppContext MyApplicationContext; Widget TopLevel, mybutton; Display *TheXDisplay; int n; Arg args[20]; XtToolkitInitialize(); MyApplicationContext = XtCreateApplicationContext(); TheXDisplay = XtOpenDisplay (MyApplicationContext, NULL, "Xtest", "Xtest", NULL, 0, &argc, argv); TopLevel = XtAppCreateShell (NULL, "Xtest", "applicationShellWidgetClass", TheXDisplay, NULL, 0); n = 0; XtSetArg (args[n], XtNwidth, 200); n++; XtSetArg (args[n], XtNlabel, "Blah!!"); n++; mybutton = XtCreateManagedWidget ("TopLabel", commandWidgetClass, TopLevel, args, n); XtRealizeWidget (TopLevel); XtMainLoop(); } -- Xev Gittler xg00@gte.com, or xg00%gte.com@relay.cs.net