Enhanced CSD
by Andrew Hersee with additions by Richard Hallas

Have you ever run a program which gives the error '<filename> not found', and yet you can see the file mentioned in the same directory viewer as the program? The problem usually arises because the Currently Selected Directory (CSD) being set to a different directory.

The CSD is the directory you would be in if you entered the command line with F12 and typed '*.'. If the computer is asked to access a file without a pathname then it looks inside the CSD. Opening a directory in the Desktop does not set the CSD, so being able to see the file in a directory viewer does not mean that a program which does not use full pathnames will be able to access it. This application allows easy setting of the CSD from the Desktop.

Run the application to install it on the Pinboard (it can also be installed on either side of the icon bar, by dragging it there). To set the CSD simply drag the CSD icon to the directory viewer you want to become the CSD.

The application is compatible with most pinboard/backdrop applications including Acorn's Pinboard supplied with RISC OS 3, and SuperBD from RISC User Volume 6 Issue 2.

Once you are satisfied with the icon's position you can lock it so that it cannot be moved accidentally. To do this click Menu over the icon and choose 'Lock' from the menu. A tick to the left of 'Lock' signifies that it is already locked. It may be unlocked by choosing 'Lock' again. The 'Display CSD' entry may be toggled on and off by choosing it. If it is on, then each time you drag the CSD icon to a directory, the pathname will be displayed until the next mouse click. If it is off you will simply hear a beep when you change the CSD. The 'Save State' option will save the present state of the application so that all options and positions will be remembered the next time it is loaded.

Clicking Adjust on the CSD icon will either beep if you have not set the CSD or open the Filer window containing the directory you last set to be the CSD. You can enter the initial pathname of the CSD (which will be set when the application is loaded) by editing the system variable CSD$CSD in the !Run file. A value of "" will prevent the CSD from being set until you drag the icon to a window. If you enter an invalid path, a message will inform you when you run the application.

--- Version 1.10 --- RGH

The following changes have been made:

 New features:
  
   A multisync icon has been added, both for the Filer display (!Sprites22) and for the program itself. CSD will use the most appropriate icon for the current screen mode, updating as you switch modes.

   Context-sensitive interactive help, including full menu-help for RISC OS 3.

   Initial setting of the CSD via the system variable CSD$CSD has been provided.

 Bug fixes:

   Under RISC OS 3.1 (if not other versions), if a mode-change occurred when the icon was on the Desktop background, it would fail to reappear, rendering the program useless (operating, but with no user interface).

   If the icon was positioned at the outer edge of a large screen mode, and you changed to a smaller mode and back again, the icon would not put itself back in its proper place in the larger mode.

   When repositioning itself on the outer edges of a small screen mode (after changing from a large one), the icon would underestimate the number of screen pixels by 1.

   If the icon was on the Desktop background and a mode-change occurred straight after changing the CSD, the icon could position itself beneath the Filer window you dragged it to (even if locked). Of course, it should never move under these circumstances.

 Minor changes/fixes:

   Menu items are now 44 OS units high, as per Acorn's guidelines.

   The CSD indicator menu (which appears when you drag the CSD icon to a Filer window) now has white text on a grey background, as this is somewhat easier to read than the normal grey-on-white, and looks less like a standard menu. It is also now 44 OS units high, which looks better balanced.

   A small information 'i' icon has been added (with associated messages) to the Info window to indicate the presence of interactive help.

   Other small modifications have been made to the Info window, including fixing a bug which allowed a menu to be opened over it.

   The error handler has been improved.

   Unnecessary masks have been removed from the icon sprites.

   'Light source' changed from top right to top left on the icon sprites, in order to match the 3D buttons provided by software using the Interface Manager or similar.



 RISC User 1993
