The AFWI Command Lua Library.

Installation instructions:
1. locate the installation directory of your command installation (version 1.14.2 or higher)
  This should be C:\Program Files (x86)\Command, or something like that.

2. Browse to the Scenarios Directory under the Command installation directory.

3. unzip the contents of the AFIW_lua_lib.zip into the Scenario Directory.
   (This should put an AFWI Directory directly under the Scenarios directory)
   (under the AFWI diretory should be a Lua Directory and a Komodo Dragon directory.)
   (Under the Lua directory should be a Side directory and a Wx directory)

4. Open your command installation, and create a new scenario in edit mode.
5. Follow the instruction in AFWIinit.lua (found in the new Lua directory)



Discussion:

The Library contains 3 main files:
AFWIinit.lua  --the module responsible for loading the library into the scenario.
AFWItest.lua  --the module that defines the testing mechanism
AFWI.lua      --the module the links all the indivudal function lua files into a library.

The AFWI Lua is build of many indvidual lua function files, that are tied together 
using the library's RUnScript function. This allows for individual development and 
testing of the functions as they are developped.

IN the AFWI.lua file, there are two (2) flags that control debuggin and testing.

AFWI.Debug.
AFWI.Test.

To execute the unit tests and prove correctness, set AFWI test to 1 (or higher)
To see debugging information, set AFWI.DEbug to 1 (or higher)
Then load the libarary using the instructions in AFWIinit.lua.

If you save your new scenario, as per the directions, then the library will load when you
open the scenario. For this to happen, the files must be on the installation. The lua 
functions are not stored with the scenario.  When loading a scenario with the AFWI library,
ou should shut down the COmand program and force a new Lua State. You should not trust the
Lua state in the GUI, as there is no telling what the previous user did in the state.








