Adding a New Post-Conversion Module to 0$Converter

To add a new Post-Conversion Module to the O$Converter library:

  1. Open the O$Converter library in OMNIS Studio.
  2. From the component store drag a new object class into the library components window.
  3. Name the object class using the naming convention "Module_YourTask". The O$Converter library executes modules in alphabetical order of their names. This is important because there are some modules which must be run before others, e.g. The removing of blank lines must be done last because other modules may introduce blank lines by deletion of lines of code.
  4. Add a user defined class method, called '$run'.
  5. Add a parameter to the method pLibRef which will receive an item reference to the newly converted Studio library to be processed.
  6. Add your code to this method. Note that you may call other class methods as part of your processing.
  7. Since some processing is interdependent, it may be important to order your module so that it is called at the appropriate time, depending on the type of class and processing that is required.
  8. Note: Developers are encouraged to look at the code for the modules that are implemented and use these as templates for their own custom modules.

When the converter library is run your new post-conversion module will be called automatically.

  1. The $construct methods of all modules are called initially.
  2. The $run method is called for each module in turn and the modules' code is executed.

Important Notes Regarding Construction of Modules

  1. Since it may take a long time to process a large library, the O$Converter is designed to run unattended (for example overnight). Modules should not include any user interface elements that may interrupt this in the $run method or methods called by the $run method (i.e. opening windows, OK message, Yes/No message, Prompt for input commands etc.). These interface elements may be put in the $construct method since all modules' $construct methods are called prior to any processing of the library.

Superclass Object oModuleSuper

You can use the superclass module called "oModuleSuper" when building post-conversion modules. This class provides a standard framework for building modules, together with a number of reusable methods which you can inherit and call from your custom module. The process for creating a module using oModuleSuper differs from that described above. For information about creating post-conversion modules in this way, see Building Modules Using the Superclass Object oModuleSuper.

For information about post-conversion tasks, see Post-Conversion Tasks Performed by 0$Converter.