Path: utzoo!attcan!utgpu!jarvis.csri.toronto.edu!rutgers!sun-barr!cs.utexas.edu!uunet!mcvax!ukc!strath-cs!turing!arthur From: arthur@turing.ac.uk (Arthur van Hoff) Newsgroups: comp.windows.news Subject: Re: NeWS applications should not depend on file access on the server Message-ID: <644@tivax.turing.ac.uk> Date: 5 Jun 89 11:14:49 GMT References: <7506@hoptoad.uucp> Reply-To: arthur@turing.ac.uk Organization: Turing Institute, Glasgow, Scotland. Lines: 34 Hi there, Some remarks have been made on the file usage of GoodNeWS applications. It is true that for standard applications it is NOT a good idea to load a PostScript file using the server. There are some situations where it is forgivable: - If the file is part of a standard interface and therefore has to be available to the server anyway. - If the application is entirly written in PostScript. - If you are using a low-bandwidth connection. Here is your own responsibillity to make sure that the remote server will be able to access the file. One problem remains. You need to specify a full-pathname when a file is loaded from the server. This is caused by the fact that the server may have a different current-directory than the application. In GoodNeWS/HyperNeWS (where most applications are entirely PostScript based) a simple but not very effective solution was used. A routine called "ExtendFileName" was implemented which attempts to open a file by searching a number of directories depending on the file extension. This allows you to store a set of PostScript files in library directories which can be loaded without specifying a full pathname. For example: (test.draw) ExtendFileName ---> (/usr/arthur/draw/tmp.draw) (~/help/text.1) ExtendFileName ---> (usr/arthur/help/text.1) (arthur.img) ExtendFileName ---> (/usr/local/GoodNeWS1.2/img/arthur.img) At the moment the list of directories which are searched is fixed. A good idea would be to specify a list of directories using an environment variable. Arthur van Hoff