home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: InfoMgt / InfoMgt.zip / genmb107.zip / readme.plugins < prev    next >
Text File  |  1997-04-10  |  3KB  |  61 lines

  1. This is the readme file for plugin support under MaxBase.
  2.  
  3. If you have questions about this (or any other) topic, please
  4. redirect your comments to maxmars@pianeta.it (me, the author).
  5.  
  6.  
  7. 1) First of all, what are plugins, and why do I need them?
  8.  
  9. Plug-ins are simple Java applets/applications, or even native code
  10. applications which get called by MaxBase when the user presses
  11. certain buttons on the MaxBase panel.
  12.  
  13. You can expand the functionality of MaxBase (a graphical front end for
  14. the RXDbase database class), without having to modify its source files.
  15.  
  16.  
  17. 2) What can plugins do?
  18.  
  19. They can use the informations in the records or field names at their will.
  20. You can make a plugin to execute calculations on quantities, to make
  21. reports, to launch applications, all you want.
  22.  
  23. Want to send E-mail to someone? Just make a simple name-surname-email 
  24. database and write a plugin which calls your favourite browser, 
  25. specifying mailto:email@address as a parameter.
  26.  
  27.  
  28. 3) Care to expand? Examples, anyone?
  29.  
  30. In the plugins.zip file you will find a template for building
  31. a NetRexx application which will act as a plug-in (although it does
  32. nothing - insert your code to make it do useful work), and a first, 
  33. simple working example (show image files) which calls an applet,
  34. the GifShow from NetRexx slightly modified to make it accept parameters.
  35. Another plugin present is "printrec", the one that lets you dump
  36. records formatted in form view into a text file (then you can print
  37. that, or add to the program the logic required to send the file to
  38. the printer)
  39.  
  40. The exact procedure to build a plug-in is this:
  41.  a) copy plugin.nrx into nameofyourplugin.nrx
  42.  b) customize it! 
  43.     Plugin.nrx comes with many comments, and there is a section of code
  44.     which communicates with MaxBase, retrieving the name of the fields
  45.     of the currently loaded database, and all of the selected records
  46.     values.
  47.  c) Compile it.
  48.  d) Add to the file plugin.ini (you may have to create it) two lines:
  49.     nameofmyplugin (es: Show Image)
  50.     nameoftheapplicationtorun nameofthefiletolaunch (es: java ImgShow)
  51.  
  52. Done! Now fire up MaxBase and you will notice that as soon as you
  53. login to a database, in the main panel "nameofmyplugin" will appear
  54. as a button. Select one or more records and press this button. Your
  55. application will be launched.
  56.  
  57. To quickly test a simple plugin, just unpack plugins.zip, fire up MaxBase,
  58. login to the database imgs, select one record and press "View Text-Image".
  59.  
  60. It's all for now, folks.
  61.