This is the readme file for plugin support under MaxBase.

If you have questions about this (or any other) topic, please
redirect your comments to maxbase@bmtmicro.com (me, the author).


1) First of all, what are plugins, and why do I need them?

Plug-ins are simple Java applets/applications, or even native code
applications which get called by MaxBase when the user presses
certain buttons on the main MaxBase panel.

You can expand the functionality of MaxBase (a graphical front end for
the RXDbase database class), without having to modify its source files.


2) What can plugins do?

They can use the information in the records or field names at their will.
You can make a plugin to execute calculations on quantities, to make
reports, to launch applications, all you want.

Want to send E-mail to someone? Just make a simple name-surname-email 
database and write a plugin which calls your favourite browser, 
specifying mailto:email@address as a parameter.


3) Care to expand? Examples, anyone?

If you're not a programmer, but only want to use the provided
plugins, please refer to the jukebox.txt, dialer.txt and txtimg.txt
files to learn about their installation and use.

In the plugins.zip file you will find a template for building
a NetRexx application which will act as a plug-in (although it does
nothing - insert your code to make it do useful work), and a first, 
simple working example (show image files) which calls an applet,
the GifShow from NetRexx slightly modified to make it accept parameters.
There are other two plugin that you will find in the package:
"dialer", implementing a simple automated phone dialer and
"jukebox" which acts like a, you guess it, jukebox for multimedia files.


The exact procedure to build a plug-in is this:
 a) copy plugin.nrx into nameofyourplugin.nrx
 b) customize it! 
    Plugin.nrx comes with many comments, and there is a section of code
    which communicates with MaxBase, retrieving the name of the fields
    of the currently loaded database, and all of the selected records
    values.
 c) Compile it (with the NetRexx compiler: 
    http://www2.hursley.ibm.com/netrexx).
    Put it in a directory that's in your classpath.
 d) Add to the file plugin.ini (you may have to create it) two lines:
    nameofmyplugin (es: Show Image)
    nameoftheapplicationtorun nameofthefiletolaunch (es: java ImgShow)
    This file must be placed into the database directory -- so you can
    have different plugins for different DBs.

Done! Now fire up MaxBase and you will notice that as soon as you
login to a database, in the main panel "nameofmyplugin" will appear
as a button. Select one or more records and press this button. Your
application will be launched.

It's all for now, folks.
