SIMPOL Documentation

Tools for Converting SBL to SIMPOL

There are a number of conversion tools supplied with SIMPOL Professional to convert various aspects of Superbase packages. Some are written in SBL and some are written in SIMPOL. Here is a list of them:

The Superbase Conversion Tools
  • sbf2sbm.smp – Converts Superbase SBF files to SIMPOL sbm format (files should be unencrypted, reorganized, and preferably without passwords)

  • sbv2xml.sbp – SBL program to convert Superbase forms to SIMPOL XML forms

  • sbvr2xml.sbp – SBL program to convert Superbase graphical reports into SIMPOL XML format graphical reports (does not convert perfectly, some adjustment of the results will be needed, primarily paper size and calculations)

  • ngmengen.sbp – SBL program that converts a Superbase menu program into a SIMPOL source code file

  • dlg2sma.sbp – SBL program that converts Superbase dialogs programs (as saved from the designer) into SIMPOL source code

  • sbd_formula_reader.smp – Reads Superbase SBD files and creates a source code file that contains a function for constants, calculations, and validations for each Superbase file read where such formulae are in use. The resulting code will need to be hand-edited to be usable, since a complete formula conversion tool is not included.

The best initial approach is to convert the database tables and the forms, if there is a menu program available, convert that, grab a copy of the Address Book example and make a new project from it. Use the first form as an initial step and get it coming up using the Address Book code, modified as required. Once that is happening, use the appwindow.openformdirect() method to open the next form into the same window as a response to a menu event. From there convert any formulae using the sbd_formula_reader.smp converter and then hand adjust the resulting source code. Remember, there is an equivalent for LOOKUP() in SBL called lookup() and it can be found in the uisyshelp.sml library.

From this point onward, it just depends on how the application is constructed. Fill in all the functions and the navigational structure. Use the tool bar from the Address Book sample, or leave it out, or design your own.

To assign calculated values and do validations of field content before a record is saved, assign an event handling function to the dataform1.onsave event. The return value should be .true if the record should be saved, and .false if there is a problem and the record should not be saved. For further information about working with the Application Framework, see Chapter 26, Using the SIMPOL Application Framework.