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 theABS()
function for returning the absolute value of a number or integerappframework.sml
— Implements a fairly powerful application framework for creating GUI-style database-based applicationsboolstr.sml
— This provides functions for converting boolean and datetime values into strings and also the reversebzip2.sml
— This provides functions that wrap theBZip2.dll
compression librarycalceval.sml
— Provides a function that can evaluate a string containing a formula and return the resultcalclib.sml
— Provides a basic calculator that can be popped up and which returns the final resultcodepageslib.sml
— Code page conversion library for converting to and from various code pagescolorpalette.sml
— Provides a blob based storage for an image palettecommonreportgui.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 dialogconflib.sml
— Library of functions for reading from and writing to configuration files in the Microsoft INI file formatconsolelib.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 controlsdatetimelib.sml
— Collection of functions and types used to provide conversions from and to dates, times, and datetimes, in various formatsdb1lib.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 thetype(db1table)
family of type tagsdb1util.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 PPCSdisplayformat.sml
— Dialogs for retrieving the desired display format for various data typesdrilldown.sml
— Dialog for allowing interactive search against an index in a database table with display of requested columns and return of selected recorddxflib.sml
— Function to convert AutoCAD DXF files of a specific style into Windows bitmapserrormsgs_en.sml
— Library that converts an error code into a an English-language message that describes the errorfastset.sml
— A set object that allows elements to be string indexed objects of any type, implemented using red/black treesfilesyslib.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 functionalityformlib.sml
— Functions and types for loading and saving data-aware forms and for saving forms as source codegaugelib.sml
— Provides various progress gauge dialog typesgraphicreportlib.sml
— Provides types and functions that implement a banded report writer for use with SIMPOL databases for output to window or printerhttpclientlib.sml
— Objects for retrieving items from the web usingGET
orPOST
ieeelib.sml
— Contains function for converting to and from 4-byte and 8-byte IEEE floating point formatimagelib.sml
— Functions and types for reading and writing images in BMP and XPM formatint.sml
— Implements theINT()
function for converting a number to an integerjpeglib.sml
— Currently only supplies functions for determining the dimensions of an image in JPEG formatjson.sml
— Provides functions and types to work with JSON-encoded data, including converting to and from SIMPOLlabelslib.sml
— Implements a mailing labels package including defining, saving, loading, and printing of labelslibxml.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 componentlists.sml
— Utility library providing various strutural types, such as nodes, lists, rings, queues, and stackslogmanager.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 queueltrim.sml
— Implements theLTRIM()
function to trim spaces from the left of a stringmathlib.sml
— Contains various math functions such aspi()
,sqrt()
,sin()
,cos()
,tan()
, and moremrulib.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 submenunetinfolib.sml
— Contains functions likegetusername()
andgetcomputername_win32()
objset.sml
— An early implementation of a set object based on binary trees, but new code should use thefastset.sml
library or the internal set typeodbc2.sml
— Helper library for working with the ODBC client functionality that is part of the SIMPOL ODBC componentpad.sml
— Implements thePAD()
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 programsprintformlib.sml
— Contains useful functions for printing to window or printer, likeprintwxform()
,printrecord()
, andprinttext()
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 enginequickreportlib.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 reportsrandom.sml
— Provides the random type for use in generating pseudo-random numbersrecordview.sml
— Provides a record view implementation used by the application frameworkregistrylib.sml
— Contains the win32registry type that provides methods for reading and writing the Windows registryreorglib.sml
— Functions for reorganizing (repacking) databases in the SIMPOL database engine format (*.sbm
)repguilib.sml
— This provides the Quick Report front-end for user programsreplace.sml
— Provides thereplace()
function for replacing all instances of one substring with another in a target stringreportlib.sml
— Contains the types and functions that implement a base reporting system used by more sophisticated wrappers such as Graphic Report and Quick Reportrsalib.sml
— Contains functions and types for working with RSA encryption, including key generation, encryption and decryptionsbislib.sml
— Functions for working in a CGI environment, such asHtmlInclude()
, orHtmlRead()
sbldatelib.sml
— Implements functions for working with dates and for formatting dates as stringssblexten.sml
— Includes a conversion of functions from a Superbase sample library of the same name and which may be helpful when converting from Superbasesbllib.sml
— Functions are provided that represent various FN-style functions from SBL, such asFN_Dec()
,FN_Fact()
, etc.sbllocaledateinfo.sml
— Contains the SBLlocaledateinfo type for use with the date formatting functions insbldatelib.sml
sbltimelib.sml
— Functions for formatting times as strings and converting strings back to time valuessbnglib.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 objectssendkeys.sml
— This library implements a SENDKEYS functionality for Win32sendmail.sml
— Provides thesendmail()
easy wrapper function to thesmtpclientlib.sml
functionality for sending text-based SMTP emailsserialize.sml
— This library implements a serialization mechanism for storing objects at runtime and reloading them latersessionid.sml
— Functions and types for creating and manipulating session IDs using cookies for web applicationssessionid2.sml
— Functions and types for creating and manipulating session IDs without cookies for web applicationsshellexecute.sml
— Wrapper around the Windows API call for loading the appropriate executable for a given file type, ie. Acrobat Reader for*.pdf
filessimpollib.sml
— Contains functions that use meta-capabilities of SIMPOL to provide functions like:findfunction()
andisproperty()
smtpclientlib.sml
— Email functionality via SMTPsmtpdatelib.sml
— Implementation of a date formatting function that accepts format strings using the standard SMTP date formatsortlib.sml
— Various sorting algorithms such as Insertion sort, Quick Sort (iterative and recursive), etc.soundlib.sml
— Provides sound playback functionality that is currently Windows onlysql1.sml
— The library providing a SQL92 report engine for SIMPOL databasesstr.sml
— Provides theSTR()
for formatting a numeric value as a string using a patternstringlib.sml
— Numerous functions that implement useful string handling functionality, includingparsetoken()
,ltrim()
,rtrim()
, etc.tableview.sml
— Provides a table view implementation used by the application frameworktimer.sml
— Provides a timer type that can call an event handler either once or at intervals and which runs in a separate threadtrim.sml
— Contains theTRIM()
functionuisyshelp.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 testsurlendecode.sml
— Functions for doing URL-encoding and URL-decodingurllib.sml
— Provides the URL type and theparseurl()
function for parsing a URL into its component partsutf8lib.sml
— Functions for converting from and to UTF-8 formatuuencode.sml
— Functions for doing uuencode, uudecode, base 64 encoding and decoding and quoted printable encodingval.sml
— Implements theVAL()
functionvolatable.sml
— Provides a fairly full implementation of a database that only exists in memory. Compatible to the sbme1 family except for table modificationwindowsemaillib.sml
— Contains a data type for sending email by using the Windows scripting hostwinfiledlg.sml
— Provides a wrapper to the open and save dialogs from the operating system that can be called via thesmexec32.dll
from a program such as Superbasexmllib.sml
— Provides a number of useful programs for parsing and evaluating XML strings and can be used to enhance the functionality provided bylibxml.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" programppcsselectkey
— 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 SIMPOLwxdialog
— 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 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 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 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 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 theABS()
function for returning the absolute value of a number or integerappframework
— provides a fairly powerful application framework for creating GUI-style database-based applicationsboolstr
— formatting library for converting boolean and datetime values to string and backbzip2
— compression library wrapper for the BZip2 compression format and theBZip2.dll
calceval
— library for evaluating a string and parsing and carrying out the calculation formula and returning the resultcalclib
— library that displays a calculator and that returns the result of the calculationcodepageslib
— code page conversion library for converting to and from various code pagesconflib
— library of functions for reading from and writing to configuration files in the Microsoft INI file formatconsolelib
— library that implements a basic console window for creating console programs that interact with the userdatabaseforms
— library of types and functions that provide the full implementation of data-aware display and print forms for SIMPOLdatetimelib
— 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 astype(db1table)
for exampledb1util
— 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 recorddxflib
— 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 treesfilesyslib
— 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 objectsgaugelib
— provides various progress gauge dialog typeshttpclientlib
— objects for retrieving items from the web usingGET
orPOST
imagelib
— functions and types for reading and writing images in BMP and XPM formatINT
— implements theINT()
function for converting a number to an integeriplib
— library for hosting functions and types associated with working with the Internet protocoljpeglib
— currently only supplies functions for determining the dimensions of an image in JPEG formatlists
— utility library providing various structural types, such as nodes, lists, rings, queues, and stacksLTRIM
— implements theLTRIM()
function to trim spaces from the left of a stringmathlib
— contains various math functions such aspi()
,sqrt()
,sin()
,cos()
,tan()
, and moremrulib
— provides a library of types and functions for working with most-recently-used lists, including loading and saving to INI files and managing a submenunetinfolib
— contains functions likegetusername()
andgetcomputername_win32()
objset
— an early implementation of a set object based on binary trees, but new code should use thefastset.sml
library or the internal set typePAD
— implements thePAD()
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 programsprintformlib
— contains useful functions for printing to window or printer, likeprintwxform()
,printrecord()
, andprinttext()
random
— provides the random type for use in generating pseudo-random numbersregistrylib
— contains functions for working with the Windows registryreplace
— provides thereplace()
function for replacing all instances of one substring with another in a target stringrsalib
— contains functions and types for working with RSA encryption, including key generation, encryption and decryptionsbislib
— functions for working in a CGI environment, such asHtmlInclude()
, orHtmlRead()
SBLDateLib
— implements functions for working with dates and for formatting dates as stringssblexten
— includes a conversion of functions from a Superbase sample library of the same name and which may be helpful when converting from Superbasesbllib
— functions are provided that represent various FN-style functions from SBL, such asFN_Dec()
,FN_Fact()
, etc.SBLlocaledateinfo
— contains the SBLlocaledateinfo type for use with the date formatting functions insbldatelib.sml
SBLTimeLib
— functions for formatting times as strings and converting strings back to time valuessbnglib
— 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 typessendmail
— provides thesendmail()
easy wrapper function to thesmtpclientlib.sml
functionality for sending text-based SMTP emailsserialize
— 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 timeshellexecute
— wrapper around the Windows API call for loading the appropriate executable for a given file type, ie. Acrobat Reader for*.pdf
filessimpollib
— contains functions that use meta-capabilities of SIMPOL to provide functions like:findfunction()
andisproperty()
smtpclientlib
— email functionality via SMTPsmtpdatelib
— implementation of a date formatting function that accepts format strings using the standard SMTP date formatsortlib
— 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 playbackSTR
— provides theSTR()
for formatting a numeric value as a string using a patternstringlib
— numerous functions that implement useful string handling functionality, includingparsetoken()
,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 threadTRIM
— contains theTRIM()
functionuisyshelp
— 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 testsurlendecode
— functions for doing URL-encoding and URL-decodingurllib
— split out of a small library containing a type and function for parsing a URL from a string into its component partsutf8lib
— functions for converting from and to UTF-8 formatuuencode
— functions for doing uuencode, uudecode, base 64 encoding and decoding and quoted printable encodingVAL
— implements theVAL()
functionwindowsemaillib
— data type for sending email by using the Windows scripting hostwinfiledlg
— provides a wrapper to the open and save dialogs from the operating system that can be called via thesmexec32.dll
from a program such as Superbasexmllib
— provides a number of useful programs for parsing and evaluating XML strings and can be used to enhance the functionality provided bylibxml.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 inreorglib.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 | |
---|---|
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 calledhellocgi.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 insbiscontact
.sbiscontentsframe
— is part of thesbisframesample
, 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'sgetvariable()
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 thesbisframesample
, 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 thesbiscontactdisplay
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 thesbiscontactdisplay
code to show the record for the resulting selection.sbistitleframe
— is part of thesbisframesample
, 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 thecalceval()
function using theunittest.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 theconsolelib.sml
library to create a simple tet-based program that can interact with the user.datelibtest
— is a test suite using theunittest.sml
to implement regression testing for theDATESTR()
andstring2date()
functions.fcasetest
— is a test suite using theunittest.sml
to implement regression testing for thefcase()
function.filetypetest
— is a test suite using theunittest.sml
to implement regression testing for thefiletype()
function.fixtest
— is a test suite using theunittest.sml
to implement regression testing for the.fix()
function.string2valtest
— is a test suite using theunittest.sml
to implement regression testing for thestring2val()
function.STRtest
— is a test suite using theunittest.sml
to implement regression testing for theSTR()
function.timelibtest
— is a test suite using theunittest.sml
to implement regression testing for theTIMESTR()
,extTIMESTR()
, andstring2time()
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 treesaveimagetoblobgui.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 wxbitmapsbf2sbm.smp
— a program for converting a list of Superbase database files into SIMPOL database filessbm2smagui.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 timesbmerepair.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 componentsngmengen.sbp
— converts Superbase menu programs saved from the Superbase Menu Editor into SIMPOL source code using the wxWidgets-based componentssbv2sxp.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 Designersbvr2xml.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