Help File for !VideoBase
-----------------------------------------------------------------------------

If you already have a !VideoBase version prior to V1.40 and have obtained
this copy as an update please read ALL of this file - there is a change to
the file format and old data files must be converted to work with the new
versions.

This program is intended to index video tape recordings keeping track of
spare spaces, recordings that you do not want to overwrite and unseen
recordings. The operation of the program should be self evident except for
the following points. 

Two 'flags' are stored for each recording, the Hazard/Cherish  flag and the
Seen/Unseen flag. If the Cherish flag is set then  you are not allowed to
delete the recording without first setting the Hazard flag. The function of
the Seen/Unseen flag should be  obvious! Setting/unsetting  of the flags is
accomplished simply  by clicking on the 'radio buttons' at the top of the
window. Note that the display can be limited to only  unseen recordings
using the 'radio buttons' at the bottom left  corner of the window.

Adding a new tape to the database is achieved by choosing 'Add  Tape' on the
main menu and picking the required tape length in  hours. 

The functions of the icons in the 'VideoBase' window are as  follows: < and
> step through the database forwards and  backwards (these icons
'auto-repeat'). If the 'Show Unseen' radio  button is on then only 'unseen'
recordings will be displayed. The  >> icon steps forward to the start of the
next tape (also 'auto- repeat'). The << icon steps backwards to the start of
the  currently displayed tape, or if the displayed record is the first  one
on a particular tape back to the first recording on the  previous tape. The
|< and >| icons are used to reach the last and  first recordings
respectively in the database. The <<, >>, |< and  >| icons take account of
the the setting of the 'Show All'/'Show Unseen' radio buttons. The centre
icon is used to update the database when a record has been edited.
Interactive help is now available to explain the functions of the icons (run
the !Help application).

Note that the program finds the SHORTEST available gap on the  selected tape
when you are adding a new record. This can mean  that for example you think
that a record will be added at the  start of a tape but the program may find
a shorter gap that will  do further on. This might be confusing when you are
inputting the  end counter number for the new record. Versions 1.17 onwards
check for this and warn you if an invalid counter number has been  entered.
When using the 'Add Record' option a gap of appropriate size must exist.

To add a new recording use the 'Find Space' option on the main menu
which will attempt firstly to find the shortest gap available. If this
fails overwriting a non-cherished record is  considered, and lastly the
possibility of a combination of gaps and deleting non-cherished records is
looked at. If the search  is successful the VideoBase window will show the
gap for the  recording, or will advise that deletions of existing records
are  required. Having found or created a gap to contain the new entry  the
'Add Record' option on the main menu may be chosen.

Note that versions after 1.40 allow you to specify a long or short play gap
in the 'Find Space' dialog box. This means that (after version 1.46!) if a
30 minute gap is requested and the 'Long Play' (LP) icon is selected then a
30 minute long play gap will be searched for. VideoBase no longer makes the
assumption that short play gaps can be changed to long play or vice versa.
If this is what you want - for example a search for a 30 minute long play
gap has failed to find one - then search for a 15 minute short play gap.

Versions after 1.22 have a 'Calibration' option on the main menu.  The
purpose of this is to allow the program to calculate for you  what the
counter number will be at the end of a new recording (if  you have not
actually made the recording you will not know this  when you are inputting
the information!). The method used  requires two sets of tape counter
numbers and times which should  preferably be as far apart as possible. For
example on my  recorder the figures for a 3 hour tape are 675 at 10 minutes
and  6810 at 180 minutes. These will be different for different length
tapes (and possibly different makes!). This data is saved in a  file
WVCALDATA whenever the OK icon in the calibration window is  selected. The
calculation is not 100% accurate, but should give a  result within 50
counter units which can be ammended if required by editing the record. Do
not make the second 'time'  figure too big as the counter guessing routine
can fall victim  to a 'number too large' error (sorry about that -
complaints to  'The Micro User'!).

From version 1.46 some keyboard short cuts are supported - note that the 
main Vbase window must be open for these to work. Equally if you are running
other applications that use 'hotkeys' such as !Menon, the Vbase main window 
must be closed to pass the keypresses on.

Also supported now is a 'Report' dialog box which allows the ouput of all or
part of a VideoBase file as text or CSV. This is useful for exporting the
data to DTP or !Pipedream etc. It is also very handy for viewing the data in
table form as opposed to a card format - just drag the file icon to !Edit or
similar and the data will be displayed. You do not have to save the file
physically to disk. A !Pipedream template file is supplied in the
application directory to make the printing of reports easier.
 
If you receive this application with records already entered into the
database and you do not have old data files to use DO NOT DELETE any files
from the application directory!! This was necessary prior to version 1.40 to
start the program with a clean database. However, a menu option 'Clear Data'
is now provided to wipe the database (you do get a chance to abort the
operation before it starts!).

From version 1.48 on a new system variable, VideoBaseData$Dir has been
introduced. The reasoning behind this is that sometimes it is desirable to
have data files stored outside the application directory. For one thing if
all programs did this you could just backup the files which change when you
use the application instead of the whole application directory. Another good
reason is that it makes it possible to run the application from ArcFS
(Archive Filing System) reducing disc storage requirements (on this subject
it is of course possible to remove the SourceCode file and store it
somewhere else - that will save over 100k!).
      
If you look at the !Run file you will see an example of its use (hopefully I
will have commented it out otherwise you will get error messages when
!VideoBase can't find it's datafiles!). If this variable is not set then the
files are searched for in the application directory. I find the use of this
variable useful so I hope you do too! Note that the instructions below on
converting old format files assume this variable is NOT set, so convert the
files first and then move them to the new location.


IMPORTANT!
-----------------------------------------------------------------------------

Versions 1.40 onwards have a change to the format of the data files to
handle short/long play recordings on the same tape and add a date field. To
convert old files perform the following steps:-

 1 Copy the new application onto a blank floppy disk
 
 2 Double click on the copied application and then immediately quit again 
   (this step sets up the <VideoBase$Dir> system variable that the 'CONVERT'
   program needs to find the datafiles) 
                            
 3 Enter the copied application directory and delete any WVDATA and WVFORMAT 
   files

 4 Copy your old WVDATA and WVFORMAT files into the new application
   directory

 5 Type CHAIN"<VideoBase$Dir>.CONVERT". If this is the first time the file 
   has been converted you will need to input the current maximum number of 
   records and tapes allowed. This can be checked in the OLD !RunImage file 
   (look for max_records% and max_tapes% near the start), but will almost 
   certainly be 200 records and 30 tapes. You need to do this because these 
   limits were not stored in the old format files - the new format includes 
   them so if you convert the files again to add more records you won't be 
   asked what they are.

When the 'CONVERT' program has been run the old format files will be updated
and the whole application can be copied onto a hard disk etc. Note that
'CONVERT' also allows you to raise the maximum number of records and tapes
permitted in !VideoBase. This operation can be performed on converted files
as well, however, adding a lot of extra records may require more memory to
be allocated to allow !VideoBase to run (change the Wimpslot command in the
!Run file).

This is all a bit messy, but a consequence of storing data in BASIC arrays
(!VideoBase started out in 1984 running on a BBC 'B' in mode 7!). As it all
works fine as it is I don't really want to make too many changes and risk
including more bugs. 

The older versions of !VideoBase catered for long/short play tapes by
assuming that tapes were of one sort or another, so the 'convert' program
changes all records on 2,6 or 8 hour tapes to long play.

My nice new JVC video recorder in addition to having long/short play options
also has no tape counter - it displays elapsed time instead. Rats.

When entering new records you now get a chance (via radio buttons) to select
whether the recording has been made with long or short play. Note, however,
that 'Gaps' can be long or short play (because of the way my recorder's real
time tape counter works ) - this can make it look as though the application
is making mistakes with its maths!

40 characters may be entered for the title and subject fields in the main
(edit) and search windows, although the icons only show the first 25
characters, scrolling to show the others. If this is unacceptable the
'Template' file may be edited to increase the icon widths.    

Conditions of Use
-----------------------------------------------------------------------------

This application is supplied free to everyone 'as is', I do not give any
guarantee that it is free of bugs, or supply any warranty about its
suitability for use. However if there are any problems with it and you
notify me of them then I will do my best to rectify them given the time and
the ability.

You are may give this application to anyone, via any medium, so long as :- 

  1) It is delivered with ALL the supplied files and
     unaltered (except !Run, !Boot and demonstration files).

  2) It is not supplied on a disc you are charging
     for (except for media and postage costs).
  
You have permission to use any part or the whole application in a project
you intend to place in the public domain, as long as I am fully credited. If
you wish to use these routines in a program that is for sale (for however
much and for whatever reasons) or released as copyright material then my
express permission in writing must be obtained. I maintain copyright on all
the material supplied and reserve the right to amend these conditions in
cases where I deem misuse.                        

Complaints, suggestions, vast sums of money etc to the author:-

Paul Hobbs
Rheinpfalzstrasse 2
8070 Ingolstadt
Germany


In addition revised versions of this program may turn up in the Public
Domain library run by Peter Sykes whose address is:

96, Lanehouse Road
Thornaby
Cleveland
TS17 8EA

In the absence of any comments I shall assume the program is perfect and get
on with something a bit more interesting!

Update History    
-----------------------------------------------------------------------------
Version 1.39 - Currently released version

Version 1.40 - Now handles a mixture of short and long play recordings on the
               same tape. Changes to format of file.
             - Mouse clicks on 'Add Record' window do not now close the 
               window (unless 'OK' is clicked on!), so SELECT can be used
               to move between fields.
             - General tidying up to remove non-standard windows.
             - Seperation between menu items now correct.
             - Out of range tape id number now trapped when adding new tapes.
             - New 'Crunchable' wimplib used & some of the more gruesome
               coding removed.
             - Tidier main menu.
             - Auto repeat arrows added to 'Find Space','Delete Tape','Add
               Record', 'Add Tape' and main window.
             - Added date field.
             - <,>,<< and >> icons in main window now autorepeat.
             - 'Set Options' option added to save counter/real time format

Version 1.41 - Corrected bug in main window display (only affects new h/mm
               format).
             - Deleting a record does not now change SP/LP setting (hence
               'free space' can be long or short play).
             - Adding a new record now displays the hourglass while the
               program ponders where to put it
             - Hourglass turned on when saving the file & sorting
             - Adding a new tape now sorts the database!
             - Fixed bug with stepping back thru database with 'Show Unseen'
               selected (used to crash with 'Subscript out of range' error.
             - Improved interactive help.
             - 'Real Time' now a tick option on icon bar menu
             - 'Real Time' now extends to 'Tape Status' window! 

Version 1.42 - 'Reports' option added to main menu to output database in
             - ASCII format for transfer to !PipeDream, !Edit etc
             - Number of windows created at any one time reduced by creating
               dialogue boxes only when actually required (it used to create
               10 or 11 windows whether they were needed or not which caused
               problems when running lots of applications on a 4Mb Arc!)
             - Renumber tape option added

Version 1.43 - Report option now displays a draggable icon and report can be
               dragged directly to !Edit etc.

Version 1.44 - 'Tape Status' window speeded up with much more efficient 
               coding i.e. redraw window requests don't result in the whole 
               window being redrawn every time! It now scrolls as quickly as
               possible without using icons. Also this window now resizes 
               itself whenever gaps are added/deleted.
             - Minor changes to format of ASCII report output.
             - 'Report' dialogue box now allows records from a range of tape
               IDs to be output as well as the whole database.            

Version 1.45 - Minor bug fixed in handling of size of 'Tape Status' window 
               (tapes without free spaces confused the routine because it 
               counted gaps to work out the size of window required!).    
             - More interactive help added.
             - Report output now includes date field.
             - Interactive help messages now in seperate 'HelpText' file to 
               make translation easier.

Version 1.46 - !Impression style dialog boxes added using the Interface 
               module.
             - OK icon in report window now saves a report file if a full 
               pathname is present.
             - New 'Report' dialog box allows search strings to select
               records for inclusion in the report file.
             - !Help application included to dispense this help text.
             - Keyboard short cuts now supported (at last!!).
             - Now possible to have tapes with custom lengths (i.e. E195 etc).
             - Full interactive help (every window and action icon!).
             - More tidying up of dialog boxes, 'Cancel' icon added to all.
             - Deleting a tape now updates the number of unseen records in the
               main window.
             - Changing of SP/LP flag in main window fixed (now doesn't alter
               start times of following recordings if the record is not a gap).
             - CSV format option added to 'Report' dialog box.
             - Improved 'Search for gaps' logic now finds shortest gap of the 
               appropriate SP/LP type before checking for possible overwrites
               of existing recordings.

Version 1.47 - Bug fixed in report window (after drag saving a file, the full
               report path name was overwriting other icon data causing a crash!)
               Now once a report has been saved, the writeable icon shows the 
               full name allowing a simple click on OK to save another.

Version 1.48 - Now checks size of template file and dimensions a memory block to
               hold it. On version 1.47 the dimensioned block was too small
               causing spurious 'Bad Program' messages under some circumstances.
             - Introduced VideoBaseData$Dir system variable into the !Run file.
               See notes above as to why!
             - Tape locking added. When a tape is locked it cannot be deleted and
               the free space search doesn't consider it.
             - Enhanced report dialog box to include/exclude locked tapes.
             - Bug fix to search dialog box (was attempting to write data into
               non-existent icons causing the 'Find Space' dialog to misbehave
               and sometimes another 'Bad Program' error!).
             - Search dialog box now has button to include/exclude locked tapes.
             - Status window now shows type of gap (SP/LP).
             - New Record dialog box has 'man' button to override automatic gap
               selection (See main notes for a fuller explanation).
               
Version 1.49 - Much faster redrawing of status window.
             - Irritating unexpected disappearing dialogue trait fixed. After
               using a hot key to open a dialogue box closing one of them
               killed them all. ARRRRRRRRRRRGH!
              
Version 1.50 - Altered library routines

Version 1.51 - Minor bug fix to run under RISC-OS 3.1
             - More 'starting up a new file' bugs removed (still not perfect,
               but version 2 will use normal RISC-OS file handling so I need
               to do a rewrite anyway!)           