SIMPOL Documentation

SIMPOL Language Libraries and Samples

In keeping with our company philosophy of making sure that we use our own products (to keep us in touch with the needs of the customers), many of the lower level and higher level objects and functions are written in the SIMPOL programming language. Many of these are provided as full source code with the entire project code as samples.

The SIMPOL language components are found in the \lib directory for inclusion in projects. Most of them have equivalent SIMPOL language projects in the \projects directory. Programming samples are also primarily found in the \projects directory. In the \samples directory there are three subdirectories, each of which contains SIMPOL source files (but not projects), except for one that contains SBL programs. The SBL programs demonstrate methods of calling SIMPOL from SBL, one of which determines the dimensions of a JPEG image, the other makes the operating system "File Open" and "File Save" dialogs usable from an SBL application. There are also a group of bitmap resources in the \resources directory. Finally, in the \include directory are includable SIMPOL source files for defining useful constants, such as standard error values, or for working with specific libraries. The list of standard libraries continues to grow. In the following sections we will look at what is provided in more detail.

SIMPOL Language Libraries (*.sml)

  • abs.sml — Implements the ABS() function for returning the absolute value of a number or integer

  • appframework.sml — Implements a fairly powerful application framework for creating GUI-style database-based applications

  • boolstr.sml — This provides functions for converting boolean and datetime values into strings and also the reverse

  • bzip2.sml — This provides functions that wrap the BZip2.dll compression library

  • calceval.sml — Provides a function that can evaluate a string containing a formula and return the result

  • calclib.sml — Provides a basic calculator that can be popped up and which returns the final result

  • codepageslib.sml — Code page conversion library for converting to and from various code pages

  • colorpalette.sml — Provides a blob based storage for an image palette

  • commonreportgui.sml — Library containing the types and functions used to produce elements for the report system, such as the filter dialog, calculation dialog, and the sort order dialog

  • conflib.sml — Library of functions for reading from and writing to configuration files in the Microsoft INI file format

  • consolelib.sml — Library containing the tConsole type for creating console-style progams that allow interaction with the user.

  • databaseforms.sml — Data-aware form library providing the primary interface for working with data-aware forms and form controls

  • datetimelib.sml — Collection of functions and types used to provide conversions from and to dates, times, and datetimes, in various formats

  • db1lib.sml — Basic stub library that should never be called directly but which acts as a supplier of information to the IDE during development when using the type(db1table) family of type tags

  • db1util.sml — Database utilities library with routines for copying records, creating and maintaining system tables, etc.

  • dbconverter.sml — Import/Export conversion library with support for ASCII-Delimited, CSV, XML, SBM, and PPCS

  • displayformat.sml — Dialogs for retrieving the desired display format for various data types

  • drilldown.sml — Dialog for allowing interactive search against an index in a database table with display of requested columns and return of selected record

  • dxflib.sml — Function to convert AutoCAD DXF files of a specific style into Windows bitmaps

  • errormsgs_en.sml — Library that converts an error code into a an English-language message that describes the error

  • fastset.sml — A set object that allows elements to be string indexed objects of any type, implemented using red/black trees

  • filesyslib.sml — Functions for working with elements of a file system, such as parsing pathnames, retrieving the current directory, etc.

  • filtergui.sml — Provides the selection filter GUI functionality

  • formlib.sml — Functions and types for loading and saving data-aware forms and for saving forms as source code

  • gaugelib.sml — Provides various progress gauge dialog types

  • graphicreportlib.sml — Provides types and functions that implement a banded report writer for use with SIMPOL databases for output to window or printer

  • httpclientlib.sml — Objects for retrieving items from the web using GET or POST

  • ieeelib.sml — Contains function for converting to and from 4-byte and 8-byte IEEE floating point format

  • imagelib.sml — Functions and types for reading and writing images in BMP and XPM format

  • int.sml — Implements the INT() function for converting a number to an integer

  • jpeglib.sml — Currently only supplies functions for determining the dimensions of an image in JPEG format

  • json.sml — Provides functions and types to work with JSON-encoded data, including converting to and from SIMPOL

  • labelslib.sml — Implements a mailing labels package including defining, saving, loading, and printing of labels

  • libxml.sml — Implements the Document Object Model Core Level 1 and 2 and part of 3 plus XSLT transforms and XPATH by working with the LXML component

  • lists.sml — Utility library providing various strutural types, such as nodes, lists, rings, queues, and stacks

  • logmanager.sml — Utility library providing a mechanism to allow multiple threads to write to a text-based log file by providing a queuing system and a function to process the queue

  • ltrim.sml — Implements the LTRIM() function to trim spaces from the left of a string

  • mathlib.sml — Contains various math functions such as pi(), sqrt(), sin(), cos(), tan(), and more

  • mrulib.sml — Provides a library of types and functions for working with most-recently-used lists, including loading and saving to INI files and managing a submenu

  • netinfolib.sml — Contains functions like getusername() and getcomputername_win32()

  • objset.sml — An early implementation of a set object based on binary trees, but new code should use the fastset.sml library or the internal set type

  • odbc2.sml — Helper library for working with the ODBC client functionality that is part of the SIMPOL ODBC component

  • pad.sml — Implements the PAD() function to right-fill a string with spaces to a specified size (or to truncate if it exceeds that size)

  • parsenum.sml — Is a contribution from a member of the SIMPOL community and provides a function that converts numbers into words (in English), commonly used in check writing programs

  • printformlib.sml — Contains useful functions for printing to window or printer, like printwxform(), printrecord(), and printtext()

  • propertybrowser.sml — This implements a runtime property browser that can be very useful in tracking down the value of objects at runtime (supervisor functionality)

  • q1.sml — This is the library that implements the query optimizer for the SIMPOL report engine

  • quickreportlib.sml — Contains types and functions that implement the light-weight reporting functionality called Quick Report that can output to window, printer, database, clipboard, and other targets and which can create, save, and load the reports

  • random.sml — Provides the random type for use in generating pseudo-random numbers

  • recordview.sml — Provides a record view implementation used by the application framework

  • registrylib.sml — Contains the win32registry type that provides methods for reading and writing the Windows registry

  • reorglib.sml — Functions for reorganizing (repacking) databases in the SIMPOL database engine format (*.sbm)

  • repguilib.sml — This provides the Quick Report front-end for user programs

  • replace.sml — Provides the replace() function for replacing all instances of one substring with another in a target string

  • reportlib.sml — Contains the types and functions that implement a base reporting system used by more sophisticated wrappers such as Graphic Report and Quick Report

  • rsalib.sml — Contains functions and types for working with RSA encryption, including key generation, encryption and decryption

  • sbislib.sml — Functions for working in a CGI environment, such as HtmlInclude(), or HtmlRead()

  • sbldatelib.sml — Implements functions for working with dates and for formatting dates as strings

  • sblexten.sml — Includes a conversion of functions from a Superbase sample library of the same name and which may be helpful when converting from Superbase

  • sbllib.sml — Functions are provided that represent various FN-style functions from SBL, such as FN_Dec(), FN_Fact(), etc.

  • sbllocaledateinfo.sml — Contains the SBLlocaledateinfo type for use with the date formatting functions in sbldatelib.sml

  • sbltimelib.sml — Functions for formatting times as strings and converting strings back to time values

  • sbnglib.sml — Contains useful types and functions for interfacing with Superbase NG Personal, such as rings of data sources and tables, and an object for managing wxformoption objects

  • sendkeys.sml — This library implements a SENDKEYS functionality for Win32

  • sendmail.sml — Provides the sendmail() easy wrapper function to the smtpclientlib.sml functionality for sending text-based SMTP emails

  • serialize.sml — This library implements a serialization mechanism for storing objects at runtime and reloading them later

  • sessionid.sml — Functions and types for creating and manipulating session IDs using cookies for web applications

  • sessionid2.sml — Functions and types for creating and manipulating session IDs without cookies for web applications

  • shellexecute.sml — Wrapper around the Windows API call for loading the appropriate executable for a given file type, ie. Acrobat Reader for *.pdf files

  • simpollib.sml — Contains functions that use meta-capabilities of SIMPOL to provide functions like: findfunction() and isproperty()

  • smtpclientlib.sml — Email functionality via SMTP

  • smtpdatelib.sml — Implementation of a date formatting function that accepts format strings using the standard SMTP date format

  • sortlib.sml — Various sorting algorithms such as Insertion sort, Quick Sort (iterative and recursive), etc.

  • soundlib.sml — Provides sound playback functionality that is currently Windows only

  • sql1.sml — The library providing a SQL92 report engine for SIMPOL databases

  • str.sml — Provides the STR() for formatting a numeric value as a string using a pattern

  • stringlib.sml — Numerous functions that implement useful string handling functionality, including parsetoken(), ltrim(), rtrim(), etc.

  • tableview.sml — Provides a table view implementation used by the application framework

  • timer.sml — Provides a timer type that can call an event handler either once or at intervals and which runs in a separate thread

  • trim.sml — Contains the TRIM() function

  • uisyshelp.sml — Various functions and types for providing standard system defaults, such as system colors, default fonts, display size, etc.

  • unittest.sml — Basic unit testing library that helps in running regression tests

  • urlendecode.sml — Functions for doing URL-encoding and URL-decoding

  • urllib.sml — Provides the URL type and the parseurl() function for parsing a URL into its component parts

  • utf8lib.sml — Functions for converting from and to UTF-8 format

  • uuencode.sml — Functions for doing uuencode, uudecode, base 64 encoding and decoding and quoted printable encoding

  • val.sml — Implements the VAL() function

  • volatable.sml — Provides a fairly full implementation of a database that only exists in memory. Compatible to the sbme1 family except for table modification

  • windowsemaillib.sml — Contains a data type for sending email by using the Windows scripting host

  • winfiledlg.sml — Provides a wrapper to the open and save dialogs from the operating system that can be called via the smexec32.dll from a program such as Superbase

  • xmllib.sml — Provides a number of useful programs for parsing and evaluating XML strings and can be used to enhance the functionality provided by libxml.sml

Supplied Superbase NG Projects

Superbase NG ships with a large number of sample projects. Many if not most of the libraries listed above are included as source code projects. Below is a basic description of the directories containing projects:

Console Projects

The console directory houses projects that demonstrate basic functionality and are meant to be run from the console:

  • convert — Demonstrates a command line program for converting end of line characters in text files from DOS (CRLF) to Linux (LF) annd also to the older Macintosh format (CR)

  • hello — The usual "Hello World" program

  • ppcsselectkey — A command line program for selecting a specific record from a table on a PPCS server and then showing the content of that record.

  • urldump — A command line program for retrieving a page from the World Wide Web and either storing it in a file or dumping it to the console.

XML Document Object Model (DOM)

The DOM directory contains a sample program that fully exercises the XML DOM

  • libxml_example — Contains 14 tests that demonstrate the various features of the XML DOM support in SIMPOL

Examples

The examples directory contains GUI programs, TCP/IP sockets programs, and samples of using the lists.sml library. To begin with, the sockets examples are a pair of projects. The client project and the server project are designed to work together to demonstrate transferring a file from a server to a client upon request of the client.

  • client — Demonstrates using a TCP/IP-based client program to connect to a server and to communicate with it, including receiving both text and binary data.

  • server — Shows how to create a custom TCP/IP-based server program that implements a basic protocol and which then acts upon connections and can send and receive text data and which then sends binary data.

There are four samples that demonstrate the use of various types from the lists.sml library. These are:

  • listsample — This example demonstrates how to use the list and listnode types in order to wrap existing objects and possibly add information to them in addition to managing them in a list.

  • ringsample — This example demonstrates how to use the ring and listnode types in order to wrap existing objects and possibly add information to them in addition to managing them in a list.

  • dlistsample — This example demonstrates how to use the dlist and dlistnode types in order to wrap existing objects and possibly add information to them in addition to managing them in a list. Both dlist and dring types are better choices when you need to insert or delete from the list or ring, since they are more efficient in these operations.

  • dringsample — This example demonstrates how to use the dring and dlistnode types in order to wrap existing objects and possibly add information to them in addition to managing them in a list. Both dlist and dring types are better choices when you need to insert or delete from the list or ring, since they are more efficient in these operations.

There is a single example that shows the use of the dataform1 type family and which loads any valid form stored as an *.sxf file (opening the data sources that are referenced in the form) and then allows the browsing of records using the form. That example is:

  • dataforms — Loads and allows the browsing of data in any valid form

The udtmemberopsample project explains the implementation and use of the SIMPOL member operator (!) in a user-defined type. It is an advanced topic, but can be useful depending on the complexity of the application being developed.

  • udtmemberopsample — demonstrates the use of the SIMPOL member operator in a user-defined type

The remaining projects in this directory all demonstrate various capabilities within the GUI controls provided via the wxWidgets library.

  • ole2excel — is a sample program that demonstrates the use of OLE2 automation to open Excel, create an Excel workbook, add data, select and calculate that data, create a chart, and then read the results back out into SIMPOL

  • wxdialog — is a very small program that demonstrates the use of the wxdialog type to create a modal dialog and wait until it is closed or the OK is pressed.?

  • wxdialog2 — is a very small program that demonstrates the use of the wxdialog type to create a non-modal dialog and wait until it is closed or the OK is pressed.

  • wxdialog3 — is a very small program that demonstrates the use of the wxdialog type to create a modal dialog using the standard buttons feature, and then waits until it is closed or the OK is pressed.

  • wxdialog4 — is a very small program that demonstrates the use of the wxdialog type to create a non-modal dialog using the standard buttons feature, and then waits until it is closed or the OK is pressed.

  • wxforms — is a minimal program that demonstrates the use of the wxform and wxwindow types to display a form in a window and then wait for events.

  • wxforms2 — is a small program that demonstrates the use of the wxform and wxwindow types together with a group of form controls on the form that allow modification and include sample data. Pressing the button will evaluate the selections and content from the various form controls, close the window and return that as a result.

  • wxgrid — is a small program that demonstrates the use of the wxgrid including various aspects of using the grid control.

  • wxmenu — is a minimal program that demonstrates the use of the wxmenubar, wxmenu, and wxmenuitem types to create a basic menu bar that shows the various features supported and to add that to a window.

  • wxwindows — demonstrates the minimal amount required to create a window on the screen and then wait for events.

  • wxwindows2 — creates four different windows of various styles. Closing any of the windows closes all of them and ends the program.

Forms Examples

The forms directory contains some more sophisticated form-based GUI examples. One of them shows various controls in a number of configurations, the other is a dedicated import program that can import from PPCS data sources into SBME. It was originally designed to assist the conversion of applications from Superbase into SIMPOL.

  • demo — demonstrates the use of the various features that SIMPOL provides via wxWidgets.

  • importppcs2sbme — implements an import program that makes use of PPCS, SBME, plus the GUI components via wxWidgets.

Games

The games directory is meant to contain example game programs. The first one included shows the object-oriented implementation of the classic worm game.

  • worm — Uses a minimal set of libraries to produce a basic version of the classic worm game.

Libraries

The largest number of samples can be found in the Libs directory, which contains projects that implement reusable functionality either as functions or types.

  • ABS — implements the ABS() function for returning the absolute value of a number or integer

  • appframework — provides a fairly powerful application framework for creating GUI-style database-based applications

  • boolstr — formatting library for converting boolean and datetime values to string and back

  • bzip2 — compression library wrapper for the BZip2 compression format and the BZip2.dll

  • calceval — library for evaluating a string and parsing and carrying out the calculation formula and returning the result

  • calclib — library that displays a calculator and that returns the result of the calculation

  • codepageslib — code page conversion library for converting to and from various code pages

  • conflib — library of functions for reading from and writing to configuration files in the Microsoft INI file format

  • consolelib — library that implements a basic console window for creating console programs that interact with the user

  • databaseforms — library of types and functions that provide the full implementation of data-aware display and print forms for SIMPOL

  • datetimelib — library of functions for converting to and from dates, times, and datetimes (includes various other libraries plus its own functions)

  • db1lib — library that implements a stub class to match the db1 type tag family so that the IDE will provide useful information when working with variables that are defined as type(db1table) for example

  • db1util — database utilities library with routines for copying records, creating and maintaining system tables, etc.

  • drilldown — user-interface component that provides an interactive search capability with a display of results in a grid control and return of the selected record

  • dxflib — function for converting a specific style of *.dxf file into a Windows bitmap (includes a helper DLL)

  • fastset — a set implementation compatible with the objset type but faster using red-black trees

  • filesyslib — functions for working with elements of a file system, such as parsing pathnames, retrieving the current directory, etc.

  • formlib — types and functions for loading, saving and saving as source code dataform1 and printform1 objects

  • gaugelib — provides various progress gauge dialog types

  • httpclientlib — objects for retrieving items from the web using GET or POST

  • imagelib — functions and types for reading and writing images in BMP and XPM format

  • INT — implements the INT() function for converting a number to an integer

  • iplib — library for hosting functions and types associated with working with the Internet protocol

  • jpeglib — currently only supplies functions for determining the dimensions of an image in JPEG format

  • lists — utility library providing various structural types, such as nodes, lists, rings, queues, and stacks

  • LTRIM — implements the LTRIM() function to trim spaces from the left of a string

  • mathlib — contains various math functions such as pi(), sqrt(), sin(), cos(), tan(), and more

  • mrulib — provides a library of types and functions for working with most-recently-used lists, including loading and saving to INI files and managing a submenu

  • netinfolib — contains functions like getusername() and getcomputername_win32()

  • objset — an early implementation of a set object based on binary trees, but new code should use the fastset.sml library or the internal set type

  • PAD — implements the PAD() function to right-fill a string with spaces to a specified size (or to truncate if it exceeds that size)

  • parsenum — is a contribution from a member of the SIMPOL community and provides a function that converts numbers into words (in English), commonly used in check writing programs

  • printformlib — contains useful functions for printing to window or printer, like printwxform(), printrecord(), and printtext()

  • random — provides the random type for use in generating pseudo-random numbers

  • registrylib — contains functions for working with the Windows registry

  • replace — provides the replace() function for replacing all instances of one substring with another in a target string

  • rsalib — contains functions and types for working with RSA encryption, including key generation, encryption and decryption

  • sbislib — functions for working in a CGI environment, such as HtmlInclude(), or HtmlRead()

  • SBLDateLib — implements functions for working with dates and for formatting dates as strings

  • sblexten — includes a conversion of functions from a Superbase sample library of the same name and which may be helpful when converting from Superbase

  • sbllib — functions are provided that represent various FN-style functions from SBL, such as FN_Dec(), FN_Fact(), etc.

  • SBLlocaledateinfo — contains the SBLlocaledateinfo type for use with the date formatting functions in sbldatelib.sml

  • SBLTimeLib — functions for formatting times as strings and converting strings back to time values

  • sbnglib — contains important types used throughout much of SIMPOL, such as datasourceinfo and tbinfo as well as the types and functions used to provide option groups for wxformoption types

  • sendmail — provides the sendmail() easy wrapper function to the smtpclientlib.sml functionality for sending text-based SMTP emails

  • serialize — provides the ability to serialize an object to a file and then read the data from the file and recreate the object at a later point in time

  • shellexecute — wrapper around the Windows API call for loading the appropriate executable for a given file type, ie. Acrobat Reader for *.pdf files

  • simpollib — contains functions that use meta-capabilities of SIMPOL to provide functions like: findfunction() and isproperty()

  • smtpclientlib — email functionality via SMTP

  • smtpdatelib — implementation of a date formatting function that accepts format strings using the standard SMTP date format

  • sortlib — various sorting algorithms such as Insertion sort, Quick Sort (iterative and recursive), etc.

  • soundlib — Library with the long-term plan to be the host for sound playback routines, currently supports Windows sound playback

  • STR — provides the STR() for formatting a numeric value as a string using a pattern

  • stringlib — numerous functions that implement useful string handling functionality, including parsetoken(), ltrim(), rtrim(), etc.

  • timer — provides a timer type that can call an event handler either once or at intervals and which runs in a separate thread

  • TRIM — contains the TRIM() function

  • uisyshelp — various functions and types for providing standard system defaults, such as system colors, default fonts, display size, etc.

  • unittest — basic unit testing library that helps in running regression tests

  • urlendecode — functions for doing URL-encoding and URL-decoding

  • urllib — split out of a small library containing a type and function for parsing a URL from a string into its component parts

  • utf8lib — functions for converting from and to UTF-8 format

  • uuencode — functions for doing uuencode, uudecode, base 64 encoding and decoding and quoted printable encoding

  • VAL — implements the VAL() function

  • windowsemaillib — data type for sending email by using the Windows scripting host

  • winfiledlg — provides a wrapper to the open and save dialogs from the operating system that can be called via the smexec32.dll from a program such as Superbase

  • xmllib — provides a number of useful programs for parsing and evaluating XML strings and can be used to enhance the functionality provided by libxml.sml

SBME Database Examples

A series of command line programs that make use of the single-user database engine can be found in the sbme directory. This includes two utility programs for doing database maintenance and repair.

  • jdktutorial — was inspired by one of our users. It provides a basic tutorial on using the sbme1 family of types to first create, then populate a table in a container file. Then to open lock and modify records in that container file.

  • reorganize — provides a command line front-end to the functionality in reorglib.sml for repacking one or more database tables.

  • sbmecust — reads records from the CUST table at simpol.com port 1280 and creates an *.sbm file with the same table.

  • sbmecust2 — provides a timing test for reading records from one table and creating with them another table.

  • sbmecust3 — demonstrates creating a duplicate table in the the same container as the original table.

  • sbmereadcust — shows how to read records from a table and output them to a text file in XML format.

  • sbmerepair — provides a command line based repair program to fix a database table in the unlikely event that it may have become corrupted.

SIMPOL Tutorial Examples

All of the sample programs used in this book that are not located elsewhere can be found in the Projects\tutorial directory.

  • addressbook — implements a basic address book application using data-aware forms and the application framework.

  • colorlab — demonstrates a dialog-style application program.

  • quickreportsample — shows how to create a Quick Report program in source code.

  • sbair — contains the form, program, and required database tables from the Superbase Airlines sample that is converted in the Chapter 11, Converting Legacy Superbase chapter.

  • simpolbusiness — contains the forms, reports, program, and required database tables for the SIMPOL Business sample from the Chapter 7, SIMPOL Business chapter.

SIMPOL Web Server Programs

A full suite of web server programs, which work using CGI or ISAPI are contained in the ssp directory. To use the samples, make sure that the items from the Apache directory are placed in the appropriate locations. The items from the htdocs directory include the items in the css directory and the images that are located in the images directory. The items in the cgi-bin should be placed in the appropriate cgi-bin location in your system. These items are used by the web server sample projects. There is also a directory called: include, which contains chunks of code used by more than one project in this group. The ppcsserver directory contains a Superbase server program and associated database files, as well as a SIMPOL server program (simpolserver.smp) together with the necessary database container files and the configuration file for the server (sspsamples.cfg — read the readme.txt to run or stop the server).

The examples in this section do not demonstrate particularly attractive web pages. They are very basic in their look and feel. Designing attractive web pages is better done in an HTML authoring tool. These examples demonstrate how to use SIMPOL to dynamically create pages, as well as showing how to interact with the database and to accept data over the web. Most of the more interesting SIMPOL-based web applications are normally designed using CSS and XHTML in a proper authoring tool, and then the template pages are migrated into SIMPOL and set up to use parameters so that they can be output with varying content by the programs.

[Note]Note

All of the samples that begin with "sbis" were translated from the original samples included with the Superbase Internet Server program (SBIS).

  • hellocgi — is designed using the "server page" approach. That uses a file called hellocgi.smz, which is an HTML file containing special comments that are processed by the SIMPOL IDE into a SIMPOL program file with the same name. This is then compiled as part (or in this case as all) of the program.

  • sbiscalendar — demonstrates creating and outputting a calendar using a table.

  • sbiscontact — is a sample contact database with the ability to view the records in a simple record view format. It also allows browsing with First, Previous, Next, and Last buttons. These all call the same program with specific parameters. On the right-hand side are another set of buttons: Add, Search, Report, and Report2. These buttons call either directly or indirectly other programs in the group.

  • sbiscontactdisplay — displays a selected record (found as a result of searching using the Search button. If the selected record is not found, it redisplays the search page.

  • sbiscontactpost — handles the posting of a new record as a result of a cal to the Add function in sbiscontact.

  • sbiscontentsframe — is part of the sbisframesample, although frames have now gone very out of fashion in web design.

  • sbisenvvars — outputs all the various CGI variable values (plus those supplied by ISAPI if called from IIS) that can be retrieved via the cgicall type's getvariable() method.

  • sbisframesample — uses various SIMPOL programs to provide different frame content for each of the various frames. Frames are no longer particularly popular in modern web design, but can still have their uses.

  • sbisimagesample — demonstrates a dynamic page that shows an image.

  • sbisincludesample — shows the method of including an external HTML file into the output going back from the program to the browser.

  • sbismainframe — is part of the sbisframesample, although frames have now gone very out of fashion in web design.

  • sbisreport — runs an unoptimized report that shows its results in a table and does a three-level sort of the results. Each line of the results can be clicked on to call the sbiscontactdisplay code to show the record for the resulting selection.

  • sbisreportfast — runs an optimized report that shows its results in a table and does a three-level sort of the results. Each line of the results can be clicked on to call the sbiscontactdisplay code to show the record for the resulting selection.

  • sbistitleframe — is part of the sbisframesample, although frames have now gone very out of fashion in web design.

Tests

A few basic test programs can be found in the tests directory.

  • calcevaltest — tests the various capabilities of the calceval() function using the unittest.sml library.

  • chartest — could actually be called echo, since it returns whatever text is passed in the first parameter to the function.

  • consoletest — is a simple demonstration program that shows how to use the consolelib.sml library to create a simple tet-based program that can interact with the user.

  • datelibtest — is a test suite using the unittest.sml to implement regression testing for the DATESTR() and string2date() functions.

  • fcasetest — is a test suite using the unittest.sml to implement regression testing for the fcase() function.

  • filetypetest — is a test suite using the unittest.sml to implement regression testing for the filetype() function.

  • fixtest — is a test suite using the unittest.sml to implement regression testing for the .fix() function.

  • string2valtest — is a test suite using the unittest.sml to implement regression testing for the string2val() function.

  • STRtest — is a test suite using the unittest.sml to implement regression testing for the STR() function.

  • timelibtest — is a test suite using the unittest.sml to implement regression testing for the TIMESTR(), extTIMESTR(), and string2time() functions.

Documentation

Superbase NG contains six different books that cover various aspects of using the product. These are:

Utilities

There are a number of standalone utility programs included with Superbase NG. These include:

  • imagetool.smp — provides a tool for manipulating images for creating bitmap buttons (contributed by John Roberts)

  • projectfixer.smp — a program for changing the paths in one or more project files in a subdirectory tree

  • saveimagetoblobgui.smp — a program that converts one or more images and writes out a SIMPOL source code program that for each image provides a function that contains the image as a blob and can return it as a wxbitmap

  • sbf2sbm.smp — a program for converting a list of Superbase database files into SIMPOL database files

  • sbm2smagui.smp — a program for converting one or more Superbase NG database tables into a function that can re-create the table (empty of data), which is useful for generating tables at run time

  • sbmerepair.smp — a program for repairing a database by retrieving all records via their unique internal record ID (ignores indexes completely and can also ignore sequential linking problems)

  • sbv2sxf.smp — a program for converting a list of Superbase form files into Superbase NG display form files

Superbase Conversion Utilities

To support Superbase programmers and users, there are a number of conversion tools that are provided in the Superbase SBL programming language. These are:

  • dlg2sma.sbp — a converter for Superbase dialog programs saved from the Superbase Dialog Editor into SIMPOL source code to create the equivalent form using the wxWidgets-based components

  • ngmengen.sbp — converts Superbase menu programs saved from the Superbase Menu Editor into SIMPOL source code using the wxWidgets-based components

  • sbv2sxp.sbp — generates a SIMPOL XML print form file that is directly loadable from the SIMPOL data-aware print form support, assuming that the database tables have been saved as SIMPOL equivalents, which can be used as the starting point for working with the form in the SIMPOL Print Form Designer

  • sbvr2xml.sbp — generates an imperfect SIMPOL XML graphic report file that requires some modification under certain circumstances but should then be directly loadable from the SIMPOL graphic report code, assuming that the database tables have been saved as SIMPOL equivalents, which can be used in SIMPOL programs as loadable and runnable Graphic Reports