WimpExtension document: Using WimpExtension I tasks                   Doc 08
============================================================================


WimpExtension II should be entirely backwards-compatible with tasks
expecting WimpExtension I. However, in order that the advantages of
libraries not be completely lost, WimpExtension II does *not* automatically
load all the libraries that could be used by an old-style task when that
task initialises.

In order that the necessary libraries be available, when an old-style task
registers itself with WimpExtension II, two actions are performed. Firstly,
the file <Obey$Dir>.WimpExtLib, if any, is registered as a library file.
Secondly, a few libraries are automatically registered - these are the
libraries marked with a * in the provided 'F0-Libs' file.

Other libraries are automatically registered the first time the task
attempts to use them. Note that this means that if the library is not
already loaded then the task may require access to the library file on disc
half-way through its execution, and this may be undesirable.

There are two ways round this problem. Either you can insert WimpExt LibLoad
commands into the !Run file of the application, in order that the relevant
libraries are loaded on startup, or you can use WimpExt LibLoadOld, which
loads *all* the libraries which could possibly be used by an old-style
WimpExtension task (i.e. libraries &01-&0F, &11-&16 and &18).


Upgrading
=========
Modifications you must remember when converting from WimpExtension to
WimpExtension II which might require slight alterations to existing code:

WimpExt_DataSave       - R5 is now a pointer to a Wimp_GetPointerInfo block,
                         or 0 to use in the same manner as before.
                         R4 now contains flags in bits 0 to 2, and is no
                         longer a 0 or non-0 register - this is mainly to
                         allow saving from a heap block.
WimpExt_LoadTemplates  - On exit R2 is now updated to contain the first free
                         byte in the indirected area.
WimpExt_LinkWindows    - Bits 5-8 must be used, %0101 would give the normal
                         WimpExtension I effect, and R7 should contain the
                         Y value instead of R6.
WimpExt_SubstituteArgs - Any registers between 0 and &8000 will no longer be
                         faulted, they will be converted to a number, so to
                         fault a string's use you must set the register to
                         -1, not zero as before.

Also remember to include the WimpExt_LibraryOp calls to register the task's
library file, and to load all the required libraries.


==========================
File updated November 2004
Frank de Bruijn
==========================
