Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!wuarchive!udel!rochester!uhura.cc.rochester.edu!ub!dsinc!unix.cis.pitt.edu!gvlv2!tredysvr!paul From: paul@tredysvr.Tredydev.Unisys.COM (Paul Siu) Newsgroups: comp.windows.x Subject: Specifying resource in resource file Keywords: resource, resource database, resource file Message-ID: <989@tredysvr.Tredydev.Unisys.COM> Date: 23 Oct 90 18:21:54 GMT Organization: Unisys Corporation, Tredyffrin, PA Lines: 63 I have problems specifying resource in a resource file. For the following simple program I have listed below, I placed a resource file under the pathname: /lib/X11/app-defaults/Goodbye. The resource file is loaded when the application goodbye is run, but resource database can't seem to match the resource I have listed in the resource file. The program is in OpenLook. For the sample program below, I specified in the Goodbye resource file: Goodbye*button*XtNlabel: Goodbye This did not work. In fact, nothing else I tried worked except: *label: Goodbye Can someone please explain to me how one specifies resource in database. I am reading Young's book, but his examples does not help. I thank you for any help. Paul Siu paul@tredysvr.Tredydev.Unisys.COM ----------------------------- The simple program ---------------------------- #include #include #include #include #include #include void quit_button(); void main (int argc, char *argv) { Widget toplevel, button; /* Initialize display connection */ toplevel = OlInitialize(argv[0], "Goodbye", NULL, 0, &argc, argv); /* Create and manage the Oblong button */ button = XtCreateManagedWidget("button", oblongButtonWidgetClass, toplevel, NULL, 0); /* Add Callback to the Oblong button */ XtAddCallback(button, XtNselect, quit_button, NULL); /* Realize the Widget so it will be displayed */ XtRealizeWidget(toplevel); /* Enter Event Loop */ XtMainLoop(); } /*-------------------------------------------------------------------------- * quit_button() - Handles callbacks for the button */ void quit_button(Widget w, caddr_t client_data, caddr_t *call_data) { /* Close the display so all of the Xserver's resources are freed */ XtCloseDisplay(XtDisplay(w)); exit(0); }