home *** CD-ROM | disk | FTP | other *** search
- *******************************************************************
- Variable editor
- *******************************************************************
- Version 0.10, © Sam Kington 9th January 1994
- WimpKey © Jason Williams 13th September 1993
-
- Note: this is a pre-release version (this is the last time I have access to
- an Archimedes until March), so:
- * All the features I would like to add to it are not implemented
- * Although I think it’s pretty stable, there are probably a few bugs
- around.
-
- You can read this file from within the program by pressing Shift-F1 in a
- variable viewer, or choosing “Help” from the icon bar menu.
-
- This program requires RISC OS 3 or later - preferably RISC OS 3.10
- or later, as that was the version it was developed on. It has not been
- tested on any other platforms, but it *should* work on RISC OS 3.11 and
- 3.00. If you haven’t upgraded yet to RISC OS 3, you should: there is a lot
- of very nice software (not just this ;-) ) coming out that requires RISC OS
- 3. Anyway, I wouldn’t want to adapt it to work on RISC OS 2 because it would
- look ugly without all the 3D stuff (and 3D is good - it’s official, Acorn
- says so).
-
- Boring legal notice
- ----------------------
-
- This program is freeware (*NOT* public domain - I retain full
- copyright on code and documentation). It can be freely distributed provided
- the following conditions are met:
- * Only reasonable charges are made for media and distribution - so
- PD libraries can distribute it, but contact me for an up to date version.
- * You distribute all the files without modification, including the
- Choices file. If you want to modify the files, include the original files in
- a ”Unused“ directory or something.
- You can use bits of it in free or commercial projects, but contact
- me first and credit me in any documentation.
-
- The WimpKeys module is © Jason Williams (with slight
- style modifications by myself). See Docs.WKeyDocs for more information.
-
- Other documentation and files
- ------------------------------
-
- Docs.Vars is a list of various "special" system variables as defined
- in the RISC OS 3 PRMs. Docs.O!WimpKey and Docs.O!WKeyDocs are the old (as in
- unmodified) versions of the WimpKey module and the documentation
- respectively. Docs.Misc contains thanks, acknowledgements, a wish
- list, contact addresses and other miscellaneous stuff.
- The TaskObey directory contains several files which show various
- types or styles of variables in a task window. For people with very little
- memory, it's still a great deal better than shelling out to the CLI all the
- time.
- The !Vsn010 file serves no other purpose than to tell you this is
- version 0.10.
-
-
-
- So what does it do?
- --------------------
-
- Very simply, VarEdit is a variable editor. That is, system variables
- like Obey$Dir, Alarm$Options, Alias$@RunType_FFF, Edit$Detokenise and the
- like (see "What are system variables” for more information). VarEdit can do
- the following with variables:
- * Show lists of variables in a scrolling window on the desktop. As
- well as showing all variables, it will show variables by type (String,
- Number or Macro), or by style. The styles, currently hard-wired into the
- program, are at the moment:
- - ...$Dir : all App$Dir variables
- - ...$Path : all App$Path variables
- - File$Type_... : all file types
- - Alias$@Load..., Alias@$Run..., Alias@$Print... : load, run
- and print operations
- * Change the contents of variables.
- * Rename, copy and delete variables.
- * Save a list of current variables and their settings to a file or
- an application, either a straight list or by styles.
- * Find and replace text within variables
- * Find specific variables by name
- * Show graphical statistics on the number of variables in each type
- and style.
- * Provide complete customisation of all the keyboard short-cuts used
- by the program. You can optionally see a list of shortcuts used by the
- program, or a graphical representation of the keys used.
- * Comprehensive help is available with Acorn’s !Help, available at
- any time by clicking on the small Help icons, or by pressing F1.
-
-
- What are system variables?
- --------------------------
-
- Some of them are set up by the system, most of them are defined by
- applications; sooner or later, you will want to view or change some of them.
- RISC OS uses system variables to decide what to do when you click on or
- print a file, to remember where applications are, where !System and !Scrap
- are, where fonts are held, where to find all its Template and Message files
- (amongst other things). The application suite uses variables (Draw$Options
- et al) for user customisation, as do other applications during the Desktop
- Save protocol. To see how important variables are, *AFTER SAVING ALL YOUR
- WORK*, enter the command “*Unset *” from the CLI, and see how long the
- machine survives. (You will probably have to reset after this, as RISC OS
- has effectively forgotten everything it has learned since booting up).
-
- Using this program
- ------------------
-
- Things should be self-explanatory - if in doubt, click on the Help
- icons, move the pointer over a few icons and read the (hopefully) helpful
- messages. Almost every icon and all menu options are documented, so you
- should be able to find your way around.
- Here are a few general comments about using this program; use !Help
- for more information about menus, icons etc.
-
- To change a variable’s definition, just type in the new value and
- either press Return or move the caret in some way (the up- or down-arrows,
- or click in another part of the window). The ”Show variable“ window shows
- you what variable you are currently editing, and more importantly its
- current value (*not* necessarily the text visible in the window). Pressing
- Escape will cancel any changes you have made.
-
- Those icons in a variable viewer (usually “ABC” but occasionally
- “<>“ or even ”123“) represent the type of the variable - respectively,
- String, Macro and Number. Clicking on them doesn’t do anything. However,
- when the type icon is selected, that means that the appropriate variable is
- the current one - either the one with the caret, or the one found by ”Find“
- or ”Go to variable“.
-
- To go straight to a variable, the best way is usually to use the
- Goto dialogue box (F5) - type in the first few letters of the variable you
- are looking for and select Find (or press Return). If you select ”Search as
- you type“, VarEdit will automatically find variables as you type, so you can
- browse the list by changing the text in the dialogue box, on the fly.
- There is another way: pressing Ctrl-Shift-(A to Z) will go to the
- first variable starting with that letter, or the nearest one if there isn’t
- one. Be warned however: Ctrl-U clears the current line, and cannot easily be
- trapped as it’s a WIMP shortcut. So if you type Ctrl-Shift-U, you will go to
- the nearest variable starting with ”U“, but you will also wipe the variable
- you were at previously, and you won’t be able to undo the changes as you’ve
- moved, so the variable will have been definately written. So don’t press
- Ctrl-Shift-U!
- Other key shortcuts: Ctrl-Up and Down take the caret to the top or
- the bottom of the viewer respectively, Shift-Up and Shift-Down (or PageUp
- and PageDown) scroll the window up or down by one page *without* moving the
- caret, and finally Ctrl-Shift Up and Down scroll the window up and down by
- one line at a time. As soon as the caret moves, the window will scroll up or
- down so it is always visible.
-
- You will find that some menu options (the second half of the Edit
- and Utilities menus), and the Edit and Delete icons in the “variable styles”
- window stay shaded whatever you do. This is because this is pre-release (see
- above), so I haven’t put everything in yet. Those blank icons in the
- “Variable styles“ and ”Statistics“ windows are spaces left for defining new
- styles (...$Options springs to mind) - a nice thing to have, but not
- essential. See Docs.Wishlist for other things I would like to add to the
- program.
-
- VarEdit needs to spend some time loading the variables and creating
- viewers for them; on an ARM3 it isn’t too much of a problem, and on an ARM2
- it’s not *that* slow. Remember, typing *Show at the CLI takes time too.
- VarEdit can either hog the whole machine when it’s processing, or it
- can process in the background. By default it will allow other tasks to have
- a go at running the machine every 10 variables, but you can modify this in
- the Choices dialogue box. In general, multi-tasking every 10 variables or
- not multitasking take about the same time, and multi-tasking every 1
- variable really slows the machine down - don’t try this on an ARM2!
- Non-multitasking gives you more information about the process, as it knows
- it can write directly to the screen as it’s not letting you back to the
- machine to move its window around. The rule is, experiment and use the
- system you prefer.
-
- Key shortcuts (thanks to WimpKey - see Docs.WKeyDocs) are available
- for every menu option, and some other functions such as closing windows or
- iconising them. To set keys, click on the ”Keys...“ icon in the Choices
- dialogue box. Choose a menu and an option, and then press the key you want
- to associate with the option; VarEdit will not allow you to use the same
- shortcut for two functions, nor will it allow you to use F12, so you don’t
- have to worry. This will only work if the ”Keyboard shortcuts“ window has
- the input focus (if the title is cream rather than grey). If for some reason
- it loses the input focus, you can get it back by clicking Select or Adjust
- on the window background. Clicking Menu will bring up a sample menu showing
- what all the menus would look like with the current key shortcuts - purely
- for show, so don’t click on it because nothing will happen.
- You can see a list of current shortcuts by clicking on See List.
- VarEdit simply saves a text file with the key shortcuts, menu by menu,
- called <VarEdit$KeyListFile>. The variable VarEdit$KeyListFile is a macro,
- and by default points to a file called ”KeyList“ in the !Scrap directory,
- but you can change this by editing the !Run file, or for that matter editing
- the variable in VarEdit ;-). It will then Filer_Run it, so if a text editor
- is running it will load the file, otherwise the default owner of Text files
- will be run to edit it - usually Edit, unless you have changed
- Alias$@RunType_FFF somewhere (check it - it should be a Macro with
- <Edit$BootDir> somewhere).
-
- Finally, although theoretically variable names and values can be up
- to 255 characters long or even longer, VarEdit only allows variable names of
- up to 40 characters and values of up to 80 characters. If you have variables
- longer than that:
- * You shouldn’t have. Even Font$Path shouldn’t be that long. Long
- variables are difficult to read. If a variable is long, it’s probably
- because it contains either a very long path name (which is probably
- something to be avoided as well), or several longish path names. Why not
- replace the individual path names by variables, and make the long variable a
- variable? (Font$Path already is, so there’s no excuse). In general, you
- should use variables rather than absolute path names: they’re easier to
- read, and you don’t have to change things all the time if you move things
- around.
- * You can modify the variables VarEdit$NameLen and VarEdit$ValLen in
- the !Run file or wherever they are defined. Make sure they are numbers, and
- less than 255.
- VarEdit will warn you if it has to truncate variable names or
- values. If it has truncated anything, *QUIT THE PROGRAM!*. You run the risk
- of corrupting the system variables.