A library
is nothing else than a collection of TFunction objects.
procedure TdwsLibrary.AddFunctions;
This method is called if you assign a library to
a TDelphiWebScript object. All functions of the library
are initialized and registered to the DWS object. The
functions are deregistered automatically.
Create you own Library
- Use TdwsDemoLib from the demo
program as model.
- Create a new class inherited
from TdwsLib and override the method AddFunctions.
- Adapt the function Register
to add your new library to the component palette
of Delphi.
- Write functions and initialize
them in your overwritten AddFunctions method.
|