Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!usc!trwind!venice!diaz From: diaz@venice.SEDD.TRW.COM (Phillip Diaz) Newsgroups: comp.windows.x Subject: Wcl Question Message-ID: <1086@venice.SEDD.TRW.COM> Date: 10 May 91 02:42:02 GMT Reply-To: diaz@venice.sedd.trw.com (Phillip Diaz) Distribution: usa Organization: TRW Systems Engineering & Development Division, Redondo Beach, CA Lines: 95 Wcl users, A question to you Wcl users. I would like to read multiple resource files while in one application loop. Considering my first run through the code would look like this: ____________________________________________________________ /* -- Initialize Toolkit creating the application shell */ topShell = XtInitialize (appName, appClass, /* app name and class */ NULL, 0, /* description of cmd line options */ &argc, argv); app_context = XtWidgetToApplicationContext (topShell); /* -- Register all application specific callbacks and widget classes */ RegisterApplicationCallbacks (app_context); /* -- Register all Motif classes and constructors */ XmpRegisterAll ( app_context ); /* -- Create widget tree below toplevel shell using Xrm database */ WcWidgetCreation (topShell); /* -- Realize the widget tree and enter the main application loop */ XtRealizeWidget (topShell); /* -- Enter my own main application loop */ Main_Loop_ACT (display, app_context); ______________________________________________________________________ How do I go about reading in other resource file while the current display is up at running? I've tried this, but maybe I'm just grasping at potential problems, any help? ______________________________________________________________________ /* -- Create the Application Shell */ appShell = XtAppCreateShell(appName, appClass, applicationShellWidgetClass, display, NULL, 0); resfile = (char *) malloc (strlen(window_file) + 1); strcpy (resfile, window_file); WcLoadResourceFileCB (appShell, resfile, NULL); /* -- Create widget tree below toplevel shell using Xrm database */ WcWidgetCreation (appShell); /* -- Realize the widget tree and enter the main application loop */ XtRealizeWidget (appShell); ________________________________ I'm getting the following error: ________________________________ Warning; WcWidgetCreation (xxxxxx) - Failed Problem: No children defined in Xrm database. Possible: resource file not found (XENIRONEMENT not set?), Possible: top level widget in resource file not name xxxxxx Error: Shell widget xxxxxx has zero width and/or height ___________________________________________________ What do I need to include in the callback source ? Let's assume I want a new window when I click on a pushbutton. How about this? ____________________________________________________ /* -- open display, build Xrdb, add to app context */ dpy = XtOpenDisplay(app, clean, appName, appClass, NULL, 0, &largc, largv ); THANKS FOR ANY HELP*$&(@#&$(@$^ Phil Diaz P.S. Waiting impatiently