From: David.Smyth@sniap.mchp.sni.de (David Smyth)
Newsgroups: fj.mail-lists.x-window
Subject: Re: Problems while using WCL 2.2
Date: 5 Sep 92 02:06:09 GMT
Distribution: fj
Organization: Workstation Div., Supermicro Systems Group, Sony Corporation

Date: 4 Sep 92 16:20:17 GMT
Message-Id: <199209040820.AA16941@ap542.sniap.mchp.sni.de>
Newsgroups: comp.windows.x

Wcl 2.3, which is being readied for release at this moment, addresses
the problem with resource file loading.  WcLoadResourceFiles has
been heavily reworked and extensively tested.  The new mecahnism
copes logically with all of these cases:

Multi.wclResFiles:      \
        Multi \
        ~/Wcl2/Mri/Multi2 ~/Err ~Err ~root/home/david/Wcl2/Mri/Multi3 \
        ./Multi4 ../Mri/Multi5 SCCS/../Multi6 /home/david/Wcl2/Mri/Multi7 /xx \
        Multi8 Multi9

Here is an excerpt from the soon-to-be-posted announcement of Wcl 2.3:

...

Resource File Loading Support Improvements:
-------------------------------------------

Wcl has supported a command line option and resource specifications
to load resource files for some time now.  However, the algorithm used
to find the files was always rather deficient.

Wcl 2.3 now uses a complete mechanism to fully complement the way
Xt loads the initial resource database in XtOpenDisplay().

    1.  If the resource file name begins with tilda, then the file
        is looked as a path from a user's home directory (~/foo/bar
        or ~fred/bar etc).  If not found, a warning is given and
        the search stops.

    2.  If the resource file name begins with '/' or '.' then the
        file name is used as an absolute path or a relative path
        from the current working directory (./foo or ./foo/bar or
        ../foo/bar or /foo/bar etc).  If not found, a warning is
        given and the search stops.

    3.  If the filename can be found as a path from the current
        directory (foo or foo/bar etc), then the search stops here.
        This allows developers to very easily limit searches to the
        local directory, or sub-directories of the local directory.

    4.  Otherwise, we look for both a "system" applications default
        file and a "user" app-defaults file.  The first "system" file
        and first "user" file are merged into the resource database
        applicable to the application shell.  The files are
        found using the same algorithm used by R3, R4, or R5 Xt
        (whichever is appropriate).  XFILESEARCHPATH and the
        compiled in path (generally /usr/lib/X11/app-defaults) are
        used to find the "system" file, and XUSERFILESEARCHPATH
        or XAPPLRESDIR or the default ($HOME) are used to find the
        "user" file.

The result is that you may have wclResFiles specifications like this:

myApp.wclResFiles:      myApp/dialog1 myApp/dialog2 myApp/dialog3

and have the files found in subdirectories of /usr/lib/X11/app-defaults
and ~/app-defaults, which makes it easier to manage applications with
large and complex interfaces.


------------------------------------------------------------
David E. Smyth		      David.Smyth@sniap.mchp.sni.de
Object/X Researcher	      david@ap542.uucp
Esprit Research		      david%ap542@ztivax.siemens.com
Funding provided by: Siemens Nixdorf Informationssysteme AG
		     AP 154, Carl-Wery-Str 22, Munich 83 Germany