Path: utzoo!attcan!uunet!aplcen!uakari.primate.wisc.edu!zaphod.mps.ohio-state.edu!unix.cis.pitt.edu!gvlv2!tredysvr!paul From: paul@tredysvr.Tredydev.Unisys.COM (Paul Siu) Newsgroups: comp.windows.x Subject: OlInitialize causes resource problem Keywords: OlInitialize, resource database, pattern matching Message-ID: <994@tredysvr.Tredydev.Unisys.COM> Date: 25 Oct 90 18:38:02 GMT Organization: Unisys Corporation, Tredyffrin, PA Lines: 45 I am encountering a problem between Open Look's initialization routine OlInitialize(). When I use OlInitialize(), the resource database does not work correctly. The following program puts up a shell on the screen. This is just about the smallest Widget program one can make. ---------------------- A simple program to put up a window -------------------- #include #include #include #include #include void main(int argc, char *argv[]) { Widget toplevel; /* Top level Shell */ /* Initialize the toolkit, and establish display connection */ toplevel = OlInitialize(argv[0], "Shell", NULL, 0, &argc, argv); /* Display and manage the toplevel widget */ XtRealizeWidget(toplevel); /* Enter event loop */ XtMainLoop(); } -------------------------------------------------------------------------------- I then set up a resource file with the pathname: /lib/X11/app-defaults/Shell Shell.height: 200 Shell.Weight: 300 When I compile and run the program, the program would return an error telling me that I did not specify the window height and width. If I replace the OlInitialize() with XtInitialize(), it works fine (but then you can't use the rest of the Open Look toolkit). It will also work if one change the "Shell" in the resource file to "shell" with a lowercase letter. Why does Open Look refuse to recognize a class resource pattern? Why is there a difference OlInitialize() and XtInitialize(). Could anyone who have worked with Open Look please help shred some light into this strange matter. Paul Siu paul@tredysvr.Tredydev.Unisys.COM