SIMPOL Developer Kit Pre-Release 4f — Release Notes

CONGRATULATIONS on acquiring the new SIMPOL Developer Kit Pre-Release product. This product has already been the result of years of design and development together with in-house testing and use. In spite of that, we look forward to hearing from our customers about their experiences using the product and how we can make it better. We are closing in on the initial release version of SIMPOL Developer Kit and SIMPOL Desktop, though incremental improvements will still be released that can be downloaded. In the later releases we will also be concentrating on providing more examples and more documentation (although there must already be over 800 pages or so).

IMPORTANT!

To get access to the interim releases you will need to register online at our web site and then register your copy of the product. We will then make the downloads available to you.

Contents

Pre-Release 4f-Specific Notes
Pre-Release 4e-Specific Notes
Pre-Release 4d-Specific Notes
Pre-Release 4c-Specific Notes
Pre-Release 4b-Specific Notes
Pre-Release 4a-Specific Notes
Pre-Release 4-Specific Notes
Pre-Release 3c-Specific Notes
Pre-Release 3b-Specific Notes
Pre-Release 3a-Specific Notes
Pre-Release 3-Specific Notes
What's New
SIMPOL Developer Kit Pre-Release 2 — Release Notes
Included Files
SIMPOL Documentation in HTML Help format
SIMPOL Language Execution and Components
SIMPOL wxWidgets Components
SIMPOL IDE Components
IDE Color-coding Support
IDE Help Assistant Files
Runtime Files for the ANSI Editor
Runtime Files for the Unicode Editor
Runtime Files for Linux
The Rest
Library Code
CGI-Specific Issues
CGI Debugging
Constants
Gotchas
Using the IDE
Command Line Arguments
Debugging
Program Comments
Conclusion

Pre-Release 4f-Specific Notes

This release has been a long time in coming and includes a few new bits but more importantly it includes significant stability improvements over the previous release. It isn't perfect yet, so it is still important to save forms on a regular basis when working on them, but it should be far more usable than its predecessor. In the coming release following this one, the detail blocks will be added for forms, and a basic query engine will be added for creating ad-hoc queries. Also, the import/export functionality will be incorporated into SIMPOL Desktop in the next release. Watch for more smoothing out of various wrinkles going forward.

This release incorporates a number of improvements to the product, including:

  • On Linux the 2GB file size limitation has been removed. The new code uses the 64-bit file size capabilities, but now requires a kernel that is compiled with 64-bit support (most 2.4 kernels and later).
  • Added the system functions: !getproperty(), !setproperty() and !getvariable to SIMPOL. These are primarily used to make extremely effective and dynamic generic code, so although they are probably not for everyone, those who can use them well will be able to build great and powerful things for others.
  • LANGUAGE CHANGE!!! — the readonly keyword for use in type definitions. To set the value of a readonly property the !setproperty() system function must be used from a member function of the type.
  • The smpwin32.exe program loader has been modified to respect the double-quote character in path names. Failure to do this resulted in errors when running programs in paths that contained spaces, for example when running SIMPOL Desktop from the Start menu link if it were installed below the "Program Files" directory.
  • The IDE has been enhanced in the debugging area so that it is now possible to view the contents of an array. Yeaaaaaaa!!!
  • DATABASE CHANGE!!! — there have been numerous small improvements to the *.sbm files such that it is recommended that you reorganize (see the reorganize.smp in the projects\tools directory (sorry, currently command line only).
  • The SLIB component (shared/DLL library calls) has been added for Linux.
  • A bug in the record count code for *.sbm files from both single-user (SBME) and mulit-user (PPSR) access was causing the record count to increment every time a record was saved, instead of only for new records.
  • Added the ability to expose the unique key from *.sbm files, the internal record ID, when sharing them via the PPSR component. These items are the recordidfieldname property and the setrecordidfieldname() method of the ppcstype1servertable.
  • Added the initial version of the ODBC client component that may ship later in the year. This component provides access to external data sources using the ODBC method of access.
  • Refresh problems with the wxformsizebox object that had been reported from its use in the Form Designer have been corrected.
  • Assorted documentation fixes and enhancements for new functionality.
  • Various minor (though important!) fixes to the database components.

SIMPOL Desktop has had a number of enhancements, including:

  • The Form Designer can now draw all of the controls. The final two controls, dataform1bitmap and dataform1bitmapbutton were added. They are also able to be generated as part of a dataform1 or wxform source code target using the Save As program functionality.
  • The keyboard shortcut for deleting records has been changed from Del to Ctrl+Del. This is intended to cope with the problem encountered when simply using the Del key in an edit control on a form was causing the menu item to fire.
  • Removing all content in a grid cell in Record View was failing in the string2fieldval() call.
  • File->Modify->Table was causing SIMPOL Desktop to close whether or not there was a table or form open. This no longer shows the menu item if no table is open or if the open table is one of the sys tables.
  • File->Modify->Form was causing SIMPOL Desktop to close if there was no form open. This was caused by the closeform() code not calling managemenu().
  • Window->Close was closing all the SIMPOL Desktop windows rather than just the active desktop window. This was caused by the menu item not setting the window to invisible. The whole routine was enhanced by adding a close() method to the appwindow type.
  • Opening the datasource adrb.sbm and entering a date in a date field and then pressing enter was causing SIMPOL Desktop to close. Also, entering a date in the supplied adrbport.sfx form and pressing the enter or tab key was having the same effect. This required a major rewrite of the string2date() function to allow for a wider array of bad user input. This was done by creating a fairly flexible predictive function. This added an error parameter to the end, and this also resulted in a change to the string2fieldval() function, which also got an error parameter on the end.
  • Opening the supplied sample datasource table adrb and then opening the form adrbport.sfx in that sequence wasn't displaying the data in the form. This has resulted in code being added to the finddatasource() method of the dataform1 type to account for sbme1 datasources that have a file name but no path. There has also been a change to the formlib library, to allow all of the necessary parameters to be passed through the opendataform1() function that are supported by the xmlsdf1.getform() method. Finally, the xmlsdf1.getform() method has been enhanced to check the list of tables passed before opening a new one.
  • Selecting Close->All was closing all the onscreen stuff but leaving the Close->Form and Open->Table and some of the Modify menu options enabled. Subsequently selecting Open->Table was causing SIMPOL Desktop to close. All of this was dealt with by improvements to the managemenu() function.
  • Creating (or deleting) an index was not updating the Index dropdown list, instead it was updating the Table dropdown list by one, that is every time this was done, an extra "mytable" entry was added in the Table list. The code governing this area was carefully updated to fix these problems.
  • It was possible to create indexes but unable to delete them once they were created. This required very minor modifications to the code that is called when the index value is changed and had to do with needing to use a space " " character in the combo box instead of using the empty string "".
  • Was getting spurious "End of File" dialog every time a table was opened or the Table Definition dialog was closed. Changed the record selection code to detect the record count and to not respond to an error on the selectfirst() or selectlast() functions if the table has no records. If the selectnext() or selectprevious() functions are called, it still shows the EOF message.
  • Loading the 3-page adrbport.sxf and paging down from page 1 to page 2 was not activating the PageUp button (it was only happening when you reached page 3). Similary, paging up from page 3 to page 2 was not activating the PageDown button until page 1 was reached. This required a very minimal modification to the code that checks if the new page is 1, 2, count, or count - 1.
  • Utilites->Status->Table (after opening a datasource e.g. adrb.sbm) was causing SIMPOL Desktop to close. It turns out that a field with a value of .nul causes an error in the .tostr() function. The code was changed to trap for an index with a precision of .nul.
  • Using File->Close->All to close a table (e.g. adrb.sbm) was leaving the Utilites->Status->Table option enabled and selecting it was causing SIMPOL Desktop to close as above. (File->Close->Table) disabled the option. I assume the managemenu() function issue. Good call, managemenu() wasn't being called in this function.
  • When first loading SIMPOL Desktop, File->Open->Table was disabled but subsequently left enabled after opening and closing a data source. This is correct behavior since it is necessary to open a data source first. If a table is then closed, but not the data source, then it is still possible to open tables from the still open data source.
  • After File->Close->All the table and index comboboxes were not being disabled. They were left enabled with empty droplists. This resulted in a consolidation of the management of the tool bar icons for selecting records and the comboboxes for tables and indexes.
  • Creating a new index on a string field e.g. the "Company1" field in adrb.sbm table was causing SIMPOL Desktop to close when selecting the "Save" button if the "Index Max Chars" cell was left blank but not if it was set. On other datatype fields (e.g. integer or date), creating an index automatically sets the value of "Index Max Chars" to "100". All new indexes now get a precision of 100 except for date, time, and datetime fields where the precision is hard-coded to ,code>.nul and it can't be changed. The code that is called when you exit the cell where the value can be modified has now been changed so that if it is empty, it is reset to 100 and a warning is issued.
  • Deleting a field in the Table Definition dialog and attempting to "Save" was causing SIMPOL Desktop to close. Not consistently reproducible this one. Often the close was occuring on closing the Table Definition dialog after the "Save". If the deleted field was an indexed one, then error message "Error number 911 on updating the table in the *.sbm file" followed by a close was the result. This was happening in spite of having removed the index. This was a bug in the C-language component, that only happened if the field was indexed.
  • In the Form Designer, the menu item "Define->Graphic Properties" was initially enabled but selecting it did not open up the "Set Graphic Properties" dialog. It only became functional once a form control was selected. was it meant to be disabled initially? Thanks, we took a look at this and decided that not only that one, but also the Detail Blocks item needed more handling. The handling of both items has now been enhanced.
  • Repeatedly toggling in and out of Form Designer mode was incrementing the entry in the Data Table droplist in the Properties dialog of the Form Designer by one e.g. got multiple entries for "MyTable". This was because the code was not checking to see if the table was already present in the form before adding it. This has been revised.
  • SIMPOL Desktop was failing on machines using the Australian region when calling the File Designer. This was because the locale code was incorrectly assuming that the return value from a call to the Windows API was a decimal string, when in fact, this particular string was returned as hexidecimal.
  • In the File Definition area, it was not possible to delete an index. This was fixed by the same code changes that fixed the index creation bug.
  • In SIMPOL Desktop the File Designer code was reworked such that the main form plus the one used for getting the table name now use the system colors instead of fixed color values.

SIMPOL Examples and Libraries have also been updated, with a number of improvements or new features.

  • The dataform1 object now has been updated to properly support the bitmap and bitmap button objects.
  • The formlib has been extended to allow for the saving and loading of forms that use the new and updated controls: bitmaps and bitmap buttons.
  • Added the valid property to the dataform1 object. This is set to .true when the object is created and will be set to .false by the opendataform1() function in formlib if it fails to open a data source or table used on the form.
  • Added the code to handle opening a form in a different location to the current directory of the running program, so that the path of the form is used to try and open the data sources if these are sbme1 sources and if the initial attempt to open them fails.
  • Fixed the comparison in the deletefile() function in filesyslib.sml, which was using =@= operator to compare the UTOSdirectoryentry object that was passed in, with the one returned from UTOSdirectory.getentry() method in a loop. This could not have worked, since they are not the same object, but two different objects that refer to the same thing. Changed the comparison to use the == operator and the function now works correctly.
  • In conflib.sml, changed both the getprivateprofilestring() and writeprivateprofilestring() functions to be able to handle not having the end of line character passed, but instead to try and infer it from the ini file itself. This will not work for writeprivateprofilestring() if the file does not yet exist.
  • In stringlib.sml, added the nondigits() and nondigitsordecimal() functions for working with .toval()'s ignorechars parameter. Also added the information strings for all of the functions.
  • Fixed one spot in parsesbdentry() from sbd2sbme.smp that was using "NVU" instead of "VNU" to check for virtual NUM fields when converting a *.SBD file. Also removed some unused variables to allow building without warnings.
  • In conflib.sml, extracted the code that opens the ini file and which guesses the end of line character from the getprivateprofilestring() function and added it as a separate function called guesseolchar(). Added a new exported function called openinifile() that returns the content of the ini file prefixed with the end of line character as previously used by getprivateprofilestring(). Modified getprivateprofilestring() by adding a new parameter at the end that can contain the content of the ini file. If supplied, the ini file will not be opened but instead the content passed will be searched for the entry. This allows the ini file to be opened once and multiple calls to be made to read values out.
  • Numerous changes to the sbmerepair.smp program, specifically in the movesequential() function in order to improve the reliability of the repair process.
  • Added missing ondoubleclick event to the dataform1list object. This fixes the errors when saving forms and source code causing the wrong event to be output.
  • Enhanced db1util.sml, the fieldval2string() and val2string() functions were updated to take into account the fact that date values that are empty via PPCS may give the value 10 using SBME. The workaround for this is to hard-code that if the date value equals 10, then the string equals "". Although this does not roundtrip, it should work adequately.
  • Changes to dataform1. Added the fieldinfo array type property to the dataform1table. This contains the field name, a field reference, and a display format, which either comes from the extended information in an *.sbm file or the PPCS information for SBLdisplayformat. Also modified the code that assigns the display format in the various controls' .new() methods, and enhanced the support for empty values in the default onlostfocus event for all controls. Also added the displayformat parameter to the .new() method for dataform1text controls, which may break existing programs if they don't expressly define "error=" in the parameter list.
  • In the objset.sml, added the deleteelement() method to the objset object. Also improved the objset.difference() method since the original design wasn't as reliable. Added a set property to the objsetelement that refers to the objset that the element is a member of, to ensure that operations that take an objset and an element as arguments can check that the element is from the same set.
  • Completely rewrote the ppcsselectkey project to reflect modern practice. Much of the content of this was early versions of functions that have since been consolidated into the db1util.sml library. As such, added that library to the project and removed unnecessary old code.
  • Added the udtmemberopsample project as an example of how to use the member operator in a user-defined type.
  • Added a function to db1util.sml: copyextendedinfo() for copying the extended info from the system tables from one *.sbm file to another. Also added the getfieldinfoarray() function which returns an array with the field names, references, and format strings (if available) for a table. Added getdefaultformat() to return a default format string for the various data types. Added the extended information for the functions to the ones in the tablemanagement.sma source file.
  • Added support for the extended system tables to the reorganize() function in the reorganize.sml library project.
  • In filesyslib.sml the issamefilename() function was added to try and cope with the needs of establishing whether two file or file and path names that may differ only in case actually refer to the same file. Also added information sections for the other function that have return values.
  • Added the gaugelib project for providing a useful progress meter dialog type.
  • In sbnglib.sml, added the _ and __ properties to the datasourceinfo and tbinfo types. Enhanced the tablestatus() function by adding support for the record count information.
  • Added the record count support to volatable.
  • The winfiledlg.sml project has been converted from using the UTUI component to using the WXWN component.

The Superbase Form Conversion program SBV2XML.SBP have also been updated to reflect the latest capabilities of the form format, not yet including support for images, though SIMPOL does not support every image format supported by Superbase, so not all images will work once the support has been added to the converter. Also, embedded images in a Superbase form cannot be accessed programmatically! The image support will only work with an externally linked image, assuming that the path is still valid or that the image can be found in the current directory.

Pre-Release 4e-Specific Notes

This release incorporates a number of improvements to the product, including:

  • wxprintdialog() function for showing the printer dialog and retrieving the printer settings.
  • The wxprintout type now has a method called startprintpreview(), which allows the printout to be sent to the print preview window from where it can be viewed as well as printed.
  • wxformedittext.onchange and wxformcombo.onchange events were added.
  • wxformgrid.setcellvalue() now has a new parameter: valuearray. Using this parameter, a complete set of values can be sent to the grid in one operation, resulting in a vast improvement in execution speed and virtually no flicker of the grid.
  • LANGUAGE CHANGE!!! — it is now possible to add information strings to the function or method definitions. This is currently not heavily used in the examples, but it will be back-ported before the next release. This allows you to define the return value of a function and this will eventually be able to be picked up by the IDE and the post-processing unit for IDE tooltips and editing help as well as for identifying compile time errors.
  • LANGUAGE CHANGE!!! — it is now possible to define the member operator (!) for use in a user-defined type. Not every type is suitable to the definition of a member operator (typically this would be used for a group of types where one type contains a linked list of objects of another type). To use it, a function can be defined for both the left side of the assignment operation (essentially to assign a value to something) and for the right side of an operation (to get the reference to some object or its value) ie. to write or to read or to set and to get. Complete documentation will be in the next release in the programmer's manual. A documented example can be found in the project\examples directory, called "udtmemberopsample".
  • Numerous optimizations in the drawing and refreshing of forms and form controls.
  • Fixed the refresh problem with wxformsizebox (most obvious in the Form Designer).
  • Fixed the problem where: "When first loading Desktop, "File / Open / Table" is disabled but subsequently left enabled after opening and closing a datasource".
  • 6-digit date support in the SBLDateLib.sml project (string2date() function).
  • Assorted documentation fixes.
  • The sbme1.renamefield() method appeared to only work if the field name was the same size or shorter, this is now fixed.
  • In sbme1, continually creating and deleting large numbers of records resulted in unexpected growth of the database and a slowdown when adding records. This has been completely revised and the new algorithm is consistently fast and the database growth is now very minor over the course of time and in large data sets virtually non-existent. This was related to the algorithm for reusing space in database.
  • The PPSR server was returning an error 459 "record not available" to SBL, after running an update from SBL (always at the end — this appears to be because it was reaching end of file).
  • The staging of the txfactor was vastly improved so that the move from 5 to 6 is now a smooth progression. Previously it slowed down immensely between these two settings (on Windows).
  • The PPSR server was returning errors when dealing with an empty date field if the field was indexed when used from SBL.
  • wxgraphic objects reversed the x and y values in the point objects after they were created.
  • fixedpoint types allowed the x and y values to be changed after creation.
  • Documentation was updated for fixedpoint.new() and point.new(), which implied that they do not take parameters, but in fact they do: point.new(10,10).

SIMPOL Desktop has had a number of enhancements, including:

  • The Form Designer can now draw all of the graphic objects: lines, triangles, rectangles, arcs, and ellipses. These can be moved and resized (though not reshaped except for the line, rectangle, and ellipse objects). These can be saved with the form and reloaded. They are also able to be generated as part of a dataform1 or wxform source code target using the Save As program functionality.
  • The Form Designer now supports full creation of non-data-aware grids, including row and column labels, fonts, draggability, etc. These can also be successfully saved and reloaded with the form, as well as generated to source code.
  • Record View has been updated to use the new valuearray parameter for the wxformgrid to improve performance and appearance.

SIMPOL Libraries have also been updated, with a number of improvements or new features.

  • The dataform1 object now has been updated to properly support non-data-aware grids and dataform1graphic controls have been added to properly wrap the wxgraphic items.
  • The formlib has been extended to allow for the saving and loading of forms that use the new and updated controls, lines, rectangles, triangles, arcs, ellipses, and non-data-aware grids.

The Superbase Conversion Utilities have also been updated to reflect the latest capabilities of the form format, including support for rectangles, lines, and ellipses.

Pre-Release 4d-Specific Notes

This is primarily a bug fix release for 4c. There have been numerous improvements in SIMPOL Desktop and underlying library code. The following fixes are incorporated:

  • "File/Modify/Table" causes the desktop to close/crash whether or not there is a table or form open. This no longer shows the menu item if no table is open or if the open table is one of the sys tables.
  • "File/Modify/Form" causes the desktop to close/crash if there is no form open. This was caused by the closeform() code not calling managemenu().
  • "Window/Close" closes all the desktop windows rather than just the active desktop window. This was caused by the menu item not setting the window to invisible. The whole routine was enhanced by adding a close() method to the appwindow type.
  • Opening datasource adrb.sbm and entering a date in a datefield then pressing enter causes the desktop to close/crash. Entering a date in the supplied adrbport.sfx form and pressing enter or tab has the same result. This required a major rewrite of the string2date() function to allow for a wider array of bad user input. This was done by creating a fairly flexible predictive function. This added an error parameter to the end, and this also resulted in a change to the string2fieldval() function, which also got an error parameter on the end.
  • Opening the datasource and table adrb then opening the form adrbport.sfx in that sequence doesn't display the data in the form. A share problem? I note this if more than one Desktop instance is open. This has resulted in code being added to the finddatasource() method of the dataform1 object to account for sbme1 datasources that have a file name but no path. There has also been a change to the formlib.sml, to allow all of the necessary parameters to be passed through opendataform1() that are supported by xmlsdf1.getform(). Finally, xmlsdf1.getform() has been enhanced to check the list of tables passed before opening a new one.
  • Then selecting "Close/All" closes all onscreen stuff but leaves the "Close/Form" and "Open/Table" and some of the "Modify" options enabled. Subsequently selecting "Open/Table" causes the desktop to close/crash. All of this was dealt with by improvements to the managemenu() function.
  • Creating (or deleting) an index does not update the Index dropdown list, instead it updates the Table dropdown list by one, that is every time you try this, you get an extra "mytable" entry in the Table list. This was handled by changes to the code that handles the rereading of a table after it has been modified in the Table Designer.
  • Managed to create indexes but cannot delete once created. This required very minor modifications to the code that is called when the index value is changed and had to do with needing to use a space " " character in the combo box instead of using "".
  • Get spurious "End of File" dialog every time you open a table or close the Table Definition Dialog. Changed the record selection code to detect the record count and respond to an error on selecting the first or last record if the table is empty to not produce an error message. If selecting the next or previous record, it still returns the end of table message.
  • Loading the 3-page adrbport.sxf, paging down from page 1 to page 2 does not activate the PageUP button (only happens when you reach page 3). Similary, paging up from page 3 to page 2 does not activate the PageDown button until page 1 reached. This required a very minimal modification to the pageupdown code that checks if the new page is 1, 2, count, or count - 1.

There have also been some fixes to related program libraries, a fix to the sbme component and a fix to the fixedpoint object that was allowing modification of the properties. The IDE has also been updated with additional Help Assistant information for the point and fixedpoint objects.

The db1util.sml library and source code project have been updated to include the functionality for managing the new systables, sysfields, and sysfieldsext tables that are now included in the *.sbm files when they are created using SIMPOL Desktop.

Pre-Release 4c-Specific Notes

This is an interim release that includes a number of new features plus improvements to the RAD tools. The major changes are:

  • THERE HAS BEEN A POSSIBLE PROGRAM BREAKING CHANGE IN sbme1.opentable()! If you have not been using the error= syntax for the error parameter, but just passing the value in place, this release will break your code! sbme1.opentable() now takes three parameters, and a gradually developing standard in SIMPOL has the error parameter last in most functions and methods. As such, it is always a good idea to name the error parameter when you make function or method calls. It also helps to do this in other places where it can assist in documenting what is going on with a function or method call.
  • SIMPOL Personal has been renamed SIMPOL Desktop and is now in the main program group. SIMPOL Desktop has had numerous bug fixes in the record view area, form view area, form designer, and has a new component for creating and modifying database tables. Also, the GUI for opening PPCS-based tables has been extended to allow the typing in of a table name (in case the tables are hidden on a target server).
  • The new print architecture has been added (wxprintout, wxprintpagetemplate, wxprintpage, wxprintstring, wxprintbitmap, wxprinttextitem, and wxprintbitmapitem). The print architecture works as follows: a wxprintout contains the entire print job that will be sent to the printer or print preview window (not yet implemented). The layout of items on each page in the printout is controlled by a wxprintpagetemplate object (if all the pages have the same layout, only one template is required). The data that is specific to a given page is stored as either a string or bitmap object in the page to be printed. Data that is specific to the template is stored as either a string or bitmap object in the template, together with non-data graphic objects such as rectangles, lines, ellipses, triangles, and arcs. Data that is used on more than one template, or that is specific to the entire printout is stored as a string or bitmap object in the wxprintout object. In practice this means that if you were creating a printout for a print form and were printing multiple records, then there would be a printout object, a template object, and as many page objects as there are records to be printed. Each page only contains the actual data, the template contains the information about the position of each data object and its characteristics (colors, fonts, background colors, borders, etc.), plus any graphics that are on each page (as well as static bitmap and text items). Once the entire thing has been created, it is sent to the printer. If a graphical report is being printed, then there will often be a template for each page, since in most cases the layout of each page will be different.
  • The sbme1 object has been updated with the ability to modify existing tables (add field, modify field, delete field, add index, delete index, rename field) in addition to the already existing ability to delete and rename tables. This has been used to add an interactive GUI component to SIMPOL Desktop. Part of the GUI component allows the definition of a number of characteristics that are not directly part of the sbme1table object. These are stored in a set of system tables inside the *.sbm file. These tables are called systables, sysfields, and sysfieldsext. The content of the fields in these tables will be used to provide a number of capabilities, such as having the tables automatically correctly served by a standard ppsr server (coming very shortly in the next release). The displayformat is currently directly modifiable and follows the rules for older Superbase formats. This data is stored, together with the share type, shareability and share name (this should be restricted to a Superbase-compatible field name, but for safety's sake, spaces are not permitted via the UI). More information about this will come with the documentation for SIMPOL Desktop that will arrive in the near future. Also, a help text and a comment is currently stored in the sysfields table. The help text may eventually be integrated into a tooltip/statusbar help text capability for forms and record view.
  • The sbme and ppsr components now have a recordcount() method/capability (this is not stored, the record count is calculated when you request it and this will block any other access while it is running). This is still very fast and highly optimized. To retrieve the record count on a table that was 70MB in size with 176,000 records (roughly) took .04 seconds on a typical machine.
  • The sbme1table object now has the ability to expose the internal read-only unique record ID as an indexed read-only field. This is also now supported automatically with a default name in the SIMPOL Desktop product. DO NOT RELY ON THIS ID FOR YOUR OWN USE EXCEPT DURING A SINGLE SESSION! Although the ID is guaranteed not to change for the lifetime of the record in the table, if you reorganize the table, the ID will probably change to some other internal ID value that is unique to the newly-created table. So DON'T use it to link tables to each other! Where it can be useful is if you are doing things like removing duplicate records and you want to always have a way to return to the same record in a table during a session. Even though this field is currently always shown in sbme1table objects that are opened in SIMPOL Desktop, the entry is read-only and the dataform1 objects and the record view objects will not directly permit you to write to it. Attempting to write to this field will cause a runtime error.
  • There is a new httpclientlib.sml SIMPOL-based library that is supplied in full source code. The library provides programs with the ability to retrieve web pages using either GET or POST from a web server and returns a full httpresponse object to the caller.
  • There is also a command line program (supplied in full source) that uses the httpclientlib.sml library to retrieve web pages using either GET or POST. The command line project is a rewrite of the urldump.smp project. This also shows how to handle multiple command line arguments that are named with options.
  • The reorganize.smp program is supplied as a source code project that implements a command line based reorganize for *.sbm files. This will reorganize one table in the same *.sbm file, reorganize the table to a new file, do all tables, etc. Also demonstrates handling various command line options.
  • The sbmerepair.smp command line program will attempt to retrieve all of the data from a table in an *.sbm file by traversing the table in sequential order from the beginning until it encounters an error, and then retrieve the data from the end of the table sequentially in reverse until it encounters an error or reaches the point where it stopped.
  • A new library has been added to make it easy to send SMTP-type emails using the smptclientlib.sml. The library is called sendmail.sml and is also supplied as source code. Anyone who is interested in delving into the work needed to add the MIME support for allowing attachments, HTML messages, quoted-printable content, etc. should contact Neil Robinson. There is an existing amount of code already written for handling quoted-printable format, base64 encoding, and some MIME support code that could be contributed to these efforts. Eventually we will get to it, but if someone is in a hurry, let us know. Also, the smtpclientlib.sml project has been enhanced to handle code page conversions of messages, using the codepagelib.sml and the utf8lib.sml libraries.
  • A library that implements the ShellExecuteW() API call for Win32 has been added and supplied as a source code project.
  • The PAD.sml library has been enhanced with an LPAD() function, for doing the equivalent of PAD() but left-filled instead of right filled.
  • Some very minor improvements have been made to the lists.sml library, including some enhancements to the queue object implementation.
  • The uisyshelp.sml library (not supplied in source currently) has been enhanced with a new locale type that retrieves the user's locale information on Windows. This type is not yet set in stone, but eventually it will be adjusted to primarily support locale information that is available on all the standard target platforms: Windows (Win32, Win64, WinCE), Linux, Mac OS-X, SymbianOS, and PalmOS (Access Linux Platform), plus possibly some platform-specific extended information.
  • Documentation: This time around the SIMPOL Language Reference got most of the significant updates. All of the new C-based component capabilities in sbme, ppsr and wxwn are fully covered in the SIMPOL Language Reference. There was also some improvement done in the chapter on converting from SBL to SIMPOL in the SIMPOL Programming Guide. All of the missing documentation for the SELECT KEY, etc. statements has been added.

If you find any problems with the IDE or with the portions of SIMPOL Desktop that are in and activated, or with any conflict between the documentation and what actually works regarding any component, please let us know!

Things to look forward to in the next release

In the next release there will be a new ppsr server that will handle the new information stored in the *.sbm files. There will also be significant updates to the form designer and an added capability to define printable forms and to then print them out. Another major change that is coming is that the GUI objects based on the wxwn component will be running on Linux. There will also be a significant performance boost for grids by assigning multiple cell values in a grid control with a single statement.

Pre-Release 4b-Specific Notes

This is an interim release that only includes improvements to the IDE and installer. Specifically:

  • The hang that occurred if you were told that the project needed to be recompiled and that asked you if you should do so, has been fixed.
  • The GPF that occurred if you escaped from the Find dialog after an unsuccessful find has been fixed.
  • The Project Dependencies tool has had numerous improvements to ensure that only things that have changed get rebuilt.
  • The installer was attempting to set the user count to 3 for the smppsr32.dll and in some cases could hang or simply fail to do so. This part has been reworked and retested.

Pre-Release 4a-Specific Notes

This is an interim release with a number of improvements and a few new bits of functionality. The major changes are: significant testing and improvments to the single-user and multi-user database engines. They are now solid. We have migrated our production databases to the new database engine. A significant change in the area of the ppcstype1 object and related objects (both client and server) is the new txfactor property/parameter. This allows the user to set a throttle on the speed at which the packets are sent. When sending over the Internet, where the ping speed may be considerably slower, it can be useful to set this to 6 or 7 to slow the transmission down so that the packets don't get lost or discarded along the way.

Things that have been added include:

  • clipboard support (text and bitmaps) both setting and getting
  • mouse pointer control
  • improvements to the edit control (maxlength, getselection(), setselection(), getinsertionpoint(), and setinsertionpoint()
  • setfocus() for all controls that can take focus
  • clearfocus() for the form
  • a left double click event for the wxformlistbox
  • wxscreengettextextent() to retrieve information about the size of a string based on the font passed (a similar function will probably be a method of the print form)
  • wxformgrid.oncellselect as an event, so that you can get called whenever a cell is selected in the grid
  • there are also now vertical and horizontal scroll bars that can be activated and deactivated for a window
  • wxstatusbar was added
  • wxformbitmap object (images on forms)
  • wxbitmap now supports the following image formats: JPG, TIF, GIF, BMP, PNG, PCX, PBM, PPM, XPM, ICO, and ANI (but these are not yet shown animated).
  • ppcstype1servertable.setshareability() now allows the table to be hidden from the functionality that retrieves table lists.
  • ppcstype1servertable.setpassword() and .getpassword() methods
  • point and fixedpoint data types (part of the core simpol functionality)
  • wxgraphicline, wxgraphictriangle, wxgraphicrectangle, wxgraphicellipse, and wxgraphicarc types
  • child windows
  • documentation change to wxrgbdialog()
  • smpwin32.exe and smpw1_32.exe for running programs in normal and debug mode without a console window appearing

As described above, there have been a couple of changes to the PPCS support, but they hopefully won't break much, in that there is now a txfactor parameter for opening files and also for the server when creating a udp socket. This allows the same data to be shared at high speed locally and at slower speeds for the Internet.

Another big enhancement is that you can now host forms in the toolbar as tools. That means that in practice, if you want to add a combobox, or an edit control, or some other kind of form control (spin button once we have them, etc.) in the toolbar, you can do that by creating a small form with just that one control and adding it to the toolbar. The form can also host multiple controls, not just one.

Obviously not all of these improvements have been able to trickle down to the stuff that has been supplied that is written in SIMPOL, but that is now coming. There is now a viable record view that works extremely well. It is now possible to create records and edit records with autolocking in record view. Some of the other changes will also show up in the various tools. This release doesn't have detail blocks, but the next one will.

There have been major improvements to the SIMPOL Personal program. It now has a fully working record view, including creating records, editing, saving, and deleting. There is also now support for the file status, the selectkey() functionality, and you can also change the current index as well as switch between open tables. Everything here works for both PPCS accessed tables as well as SBME (the new single-user database engine).

Pre-Release 4-Specific Notes

This is the first pre-release of the SIMPOL Developer Kit that includes data-aware forms, support for the new XML-based form format for loading and saving forms, and the first version of the Form Designer, written in SIMPOL. The data-aware form support is currently capable of displaying forms, and selecting records using selectlast(), selectfirst(), selectnext(), selectprevious(), and selectcurrent(). The selectkey() method has not yet been added. Also, the built-in support for locking and writing records back is prepared, but not yet implemented. Finally, this version does not yet support multi-file linkage, though this is implemented partially where the data source for listboxes and comboboxes can be specified and will be used. The intention is to give you a chance to look at and begin using the new form designer, and to play a bit with the forms. Most of the standard form controls are already supported.

In the next few weeks, the remaining support for linking files as well as for data-aware grid controls, detail blocks, setting the tab order, setting and applying default properties, etc. will be added to the designer. Utilities are provided for converting Superbase data files via PPCS to the SIMPOL database format. There are also utilities for converting forms to the new XML format, menus to source code, dialogs to source code, and forms to source code. Eventually menus, dialogs, and tool bars will have XML-based formats and will be able to be loaded and saved from these formats.

Other new pieces that have been added: wxformedittext and wxformtext now support alignment, wxformedittext now has additional capabilities, such as read-only, multiline, password, etc. More is coming here. The standalone scrollbar control has been added. Popup menus are now available. The common dialogs for selecting fonts and colors have been added. All of the form1 and window1 documentation and files have been dropped from the current product. Please migrate any use of the UTUI component to the wx equivalents. UTUI will be dropped in one of the next releases.

There is a basic sample called sbngpersonal.smp that includes the form designer and the ability to load and browse through the data. In the coming releases, the ability to modify the data (with locking), support for opening PPCS sources, and the coming tool for defining databases and tables will be added. The import/export tools are not yet integrated either. This integration will be a big part of the coming months, since the sbngpersonal.smp project will host most of the tools that you will use to create the various parts of your SIMPOL applications. Many of those tools already exist in some form, but are not yet ready to be fully integrated into the system. The form designer will get the remaining features in the near future, including a tools palette. Still, it is quite usable as is. When you have some controls selected, try the right-mouse button out.

To try out an existing Superbase form (not yet with detail blocks please), use the remote connections tool in SB 3.6i or later to share the data file(s). Then using the importppcs2sbme.smp import the PPCS-based Superbase data tables into SBME tables. At the beginning, it is recommended to put one table only in each container file. There are options for this in the tool. Then, export the form to XML using SBV2XML.SBP. Make sure that the *.sbm files and the *.sxf file for the form are in the same directory, and they should open up in the sbngpersonal.smp program immediately and be browsable. The forms should also be modifiable in the form designer. There is a sample that demonstrates how to work a bit with the dataform1 forms. It is called dataforms.smp and can be found in the examples directory.

The current release includes a fairly complete set of wxWidgets-based window, form, form control, and dialog objects. This does not include all possible wxWidgets components, by a far margin. Some more will be still added, but many will come in the releases down the road. The wxdialog objects can be either modal (like existing Superbase dialogs) or non-modal (more like an extra window that has no menu or toolbar and can't be resized). When shown modally, there is a processmodal() method of the window that should be called. Just as with other process-type calls, it takes a timeout value so it can be closed automatically after a certain interval. I am sure that there are many of you who have wished this were possible in the past in your Superbase programs, when you had users who left dialogs up and then went to lunch or home (or on vacation). All of the common dialogs from UTUI are now available using the WXWN component, plus a number of new ones. The remaining common dialogs for Printer and Page Setup will be provided when the print architecture is added.

Currently, all of the wxWidgets components are only available for Win32, but we will be making them available for Linux, WinCE, and Mac OS-X eventually.

For tips and approaches to using the new forms, windows, and dialogs, see the demo in the forms directory and the various samples in the examples directory. The demo uses forms that are for the most part directly converted from the SBVs (created using the Superbase Classic form designer). The documentation in the Programmer's Guide has not yet been updated to use the new forms, dialogs, and windows. That will come.

Documentation of the Form Designer and the SIMPOL Personal program as well as the dataform1 family of objects will be coming soon. Some of it should be fairly obvious, but if not, post questions on the news server at news://news.simpol.com in the sbng.programming.general group.

Warning!

Do not yet commit any production data to the data base engine! Also, remember to save forms regularly. The form designer is not yet complete, and it doesn't yet warn you to save the form before closing! Much more of the typical capabilities associated with a desktop database will be present in each succeeding release.

Pre-Release 3c-Specific Notes

This is an early release where not all of the changes are fully documented. It is primarily intended as an update to the existing SBME and PPSR database engine functionality, although there are some additional changes in the area of the wxformgrid control, though these will not be documented until the next release in a few weeks time. This release contains a vastly improved state of the single user and multi-user database engines, including accessing the multi-user engine from Superbase Classic as well as SIMPOL. The early test results are quite promising, showing the new SBME engine to be between 5 and 10 times faster than the current single user SBF engine. The multi-user engine using PPCS is roughly twice as fast from a Superbase-based (SBL) client and nearly four times faster from a SIMPOL-based client when compared to using SB Classic as the database server.

Pre-Release 3b-Specific Notes

This release includes toolbars, the new grid control, and the new wx-based common dialogs that replace the existing UTUI components: file open/save common dialog, directory picker, and message box. With this release there is now a minimal record view client, together with a basic import/export tool. These tools are standalone programs currently, though it is expected that they will eventually be incorporated into an end-user personal database type of program. The import/export tools are not currently optimized for speed, but they do work well enough to be useful. If you run into any problems with the tools please report them. The next release will also have a tool for creating database tables, plus the long-awaited data-aware form support. The release after that should contain the initial form designer. The Language Reference has been updated to include the latest components, and for the first time now contains the information about the member operator (!) where it is supported.

Pre-Release 3a-Specific Notes

We have now added menus and bitmap buttons to the list of available GUI controls. In addition, there is a conversion program to convert menus from Superbase 3.x to SIMPOL source code. A large number of examples have been produced covering the wxwindow, wxdialog, wxform, and the various form controls. The demo has been updated to account for the new capabilities. There are a few new and updated libraries, including a volatile file library. The lists library has been fairly heavily reworked. The Programmer's Guide has been updated with a new chapter that covers the use of the wx-based GUI components. The older chapters covering window1 and form1 have been removed, and the samples are no longer shipped. With the next release, the libraries will no longer be shipped, so if you are using them for anything, please migrate to the wx-based components. There is also a new chapter in the Programmer's Guide that briefly covers the supplied SIMPOL-language libraries. This chapter will be greatly fleshed out over time. The Reference Guide has also been updated with the latest documentation. A number of improvements have been made that greatly improve the efficiency of SIMPOL internally, so there has been a significant speed improvement in a number of areas, including the libxml.sml library.

Pre-Release 3-Specific Notes

Welcome to the 3rd pre-release of SIMPOL Developer Kit and the SIMPOL programming language. There have been a number of important changes since the Pre-Release 2 series came out. Most significantly, all of the window1 and form1 controls have been deprecated in favour of the new wxwindow and wxform controls. In doing this we took a bit of a step backward, since we already had working window and form controls for Win32, but we also took a major step forward, since by choosing to use the wxWidgets cross-platform toolkit, we will have very little trouble getting all of the user interface components running on a number of different platforms, including Win64, Linux using GTK+, WinCE (PocketPC/Windows Mobile), and Mac OS-X. Currently you should still use the UTUI components for message boxes and the open and save file dialogs, but those will also be replaced with wx equivalents before too long. To make the use of these pieces easier, a new utility has been included that converts from the Superbase form to a wxform as source code. We will also soon be releasing a new version of our XML library with support for storing the new forms as XML and then loading them and displaying them directly in SIMPOL.

An important note about debugging. Currently debugging in the IDE using the forms and windows is torturously slow while waiting for the form to display. Also, often the variables window does not show anything in event handlers, though quick watch normally works correctly. We are aware of this and are working to fix it quickly. We felt that it was more important to get a usable set of UI tools out to you than to delay even longer. For the best speed, run the programs from a command line (or double-click on them using Explorer or equivalent.

What's New

The current release includes our initial cut of wxWidgets-based window, form, form control, and dialog objects. These are not all complete, but there is enough there to get started. A significant change is that instead of calling a process() method of a window object, there is a wxprocess() function that processes all of the windows, and a companion wxbreak() that breaks out of the wxprocess() function call. The wxdialog objects can be either modal (like existing Superbase dialogs) or non-modal (more like an extra window that has no menu or toolbar and can't be resized). When shown modally, there is a processmodal() method of the dialog that should be called. Just as with other process-type calls, it takes a timeout value so it can be closed automatically after a certain interval. I am sure that there are many of you who have wished this were possible in the past in your Superbase programs, when you had users who left dialogs up and then went to lunch or home (or on vacation).

Currently, all of the wxWidgets components are only available for Win32, but we will be making them available for Linux and WinCE relatively soon, and Mac OS-X somewhat later.

For tips and approaches to using the new forms, windows, and dialogs, see the demo in the forms directory. It uses forms that are for the most part directly converted from the SBVs (created using the Superbase Classic form designer). The documentation in the Programmer's Guide has not yet been updated to use the new forms, dialogs, and windows. That will come soon. Also, the associated source code examples still use the old windows and forms. These will also be updated when the documentation is changed (very soon!).

We have added a number of libraries (including source!) to the system. One in particular, the winfiledlg.sml is provided for making it easy to use the open and save file dialogs from Win32 from within the older Superbase product. There is also an example program provided in SBL. Other libraries are provided that may not be complete, but which are intended to host a specific style of functionality, such as the xmllib.sml.

We now have UTOS components (file system interrogation) for both Win32 and Linux.

There is a new SBP-based utility to convert SBVs to SIMPOL source code, called SBV2WXSM.SBP. To see it in action, look at the sample project called demo in the Projects\forms directory.

SIMPOL Developer Kit Pre-Release 2 — Release Notes

This release was more-or-less "feature complete". At this stage you were able to build some fairly sophisticated straight processing programs, programs that can be called from Superbase as DLL calls, CGI programs, and form-and-window based programs. Using this release those programs could incorporate database access using PPCS and SBME (single-user) and could communicate via TCP/IP using the tcpsocket objects using either Linux or Win32. The IDE was essentially complete. You could also debug CGI programs in the IDE, which greatly reduces the time to develop and debug sophisticated web server applications.

This release contained the first testing release of the new database engine. This is a testing release, so it has not had any speed optimization done to it yet. In spite of that, it seems to be reasonably fast. How fast we are still finding out.

What's also useful to know (Pre-Release 2)

There are four online books, all of which are supplied in Windows HTML Help format (*.chm).

It is possible to call the user-interface pieces using SMEXEC32.DLL from Superbase Classic programs as long as the Superbase Classic program is running on Windows NT, 2000, or XP. This is not supported on Windows 9x (this is an operating system limitation, not us). See the new documentation and example projects for things to try out.

Expect fairly regular changes in the coming months and please give us feedback on your use of the product. The only way to build projects successfully is using the IDE. Although the IDE can generate make files, these cannot currently be used for maintenance because of the changes required when we went to the component-based architecture. It is now necessary to select the components being used in your program in the Project->Settings dialog box. If these are not selected then the program may fail to work because the appropriate libraries will not be loaded. This was a necessary step to allow future components to be loaded when the program is loaded. This change pretty much requires you to work from the IDE in the future until some command line tools are built to account for these issues.

Included Files

The distribution contains the following files:

Pre-Release3Read.MeThis file

SIMPOL Documentation in HTML Help format (docs\…)

TUTORIAL.CHMThe IDE Tutorial Book
IDEREF.CHMThe IDE Reference
PROGBOOK.CHMThe SIMPOL Programmer's Guide
LANGREF.CHMThe SIMPOL Language Reference

SIMPOL Language Execution and Components (bin\…)

LIBXML2.DLLThe libxml2 library from the Apache project — used by the XML DOM Component.
LIBXSLT.DLLThe libxslt library from the Apache project — used by the XML DOM Component.
SBSORT32.DLLThe Win32 sort order support library (can be used with the 32-bit ODBC driver also).
SIMPOL.SMPThe compiler (this is a compiled SIMPOL program — not for distribution).
SMCGI32.DLLThe CGI support library used by SIMPOL when called from SMPCGI32.EXE.
SMDBG32.DLLThe SIMPOL debug support library (will never be allowed to be distributed, development use only).
SMEXEC32.DLLThis allows the calling of SIMPOL programs as DLL calls for Win32.
SMGD1_32.EXEThe CGI debug wrapper for use in web servers (will never be allowed to be distributed, development use only).
SMISAP32.DLLISAPI support for Win32.
SMLXML32.DLLThe SIMPOL LXML libxml2 Component used by the XML Document Object Model library.
SMPCGI32.EXEThe CGI wrapper for use in Web servers (see below for details).
SMPD1_32.EXEThe SIMPOL debug runtime environment (never will be allowed to be distributed, development use only).
SMPRUN32.EXEThe SIMPOL runtime environment for command line programs.
SMPOL32.DLLThe SIMPOL library for Win32.
SMPPCS32.DLLThe SIMPOL PPCS support library for Win32.
SMSBME32.DLLThe Superbase Micro Engine Database SBME component library for Win32.
SMSLIB32.DLLThe SIMPOL Shared Library SLIB Component library for Win32.
SMUTOS32.DLLThe SIMPOL UTOS Operating System Utilities component library for Win32.
SMUTUI32.DLLThe SIMPOL UTUI User Interface Utilities component library for Win32.
SMWXWN32.DLLThe SIMPOL wxWidgets support library for Win32.

SIMPOL wxWidgets Components (bin\…)

wxbase26u_vc_simpol.dllThis contains the base wxWidgets support and is required when using the WXWN component.
wxmsw26u_core_vc_simpol.dllThis contains the core GUI components for wxWidgets and is required when using the WXWN component.
wxmsw26u_adv_vc_simpol.dllThis is used by advanced GUI components, such as the wxGrid control. It is not currently required or used.
wxmsw26u_gl_vc_simpol.dllThis is the opengl library support for wxWidgets. It is not currently required or used.
wxmsw26u_html_vc_simpol.dllThis is the HTML control support for wxWidgets, it provides the various HTML control capabilities, including the cross-platform HTML help support. It is not currently required or used.
wxmsw26u_media_vc_simpol.dllThis provides the cross-platform media control support and is not currently required or used.

SIMPOL IDE Components (bin\…)

SBNGIDE.EXEThe SIMPOL IDE for Win32 for Ansi
SBNGIDE.EXEThe SIMPOL Unicode IDE for Win32 (will only install to Windows NT, 2000, or XP). Only one editor installs, if the Unicode editor can be installed, then it will be selected over the Ansi editor.
SBNGIDEARA.DLLArabic language support library for the IDE (placeholder).
SBNGIDECHS.DLLChinese Simplified language support library for the IDE (placeholder).
SBNGIDECHT.DLLChinese Traditional language support library for the IDE (placeholder).
SBNGIDEDEU.DLLGerman language support library for the IDE.
SBNGIDEELL.DLLGreek language support library for the IDE.
SBNGIDEENU.DLLEnglish language support library for the IDE.
SBNGIDEESP.DLLSpanish language support library for the IDE.
SBNGIDEFRA.DLLFrench language support library for the IDE.
SBNGIDEITA.DLLItalian language support library for the IDE.
SBNGIDEJPN.DLLJapanese language support library for the IDE (placeholder).
SBNGIDENLG.DLLDutch language support library for the IDE (placeholder).
SBNGIDEPTG.DLLPortuguese language support library for the IDE (placeholder).
SBNGIDERUS.DLLRussian language support library for the IDE (placeholder).
SBNGIDESVE.DLLSwedish language support library for the IDE (placeholder).
SBCODE32.DLLIDE support library.
SMSYM32.DLLIDE support library.
SBNGIDECALLER.EXECallback program for interactive web site debugging (NT, 2000, XP only).

If you know of a language that you think we should support (or are prepared to help localize one of the above that is a placeholder, then let us know!

IDE Color-coding Support (bin\…)

The following are the INI files that are used to color code the various languages supported by the IDE.

C#.INIC#
DevStudio.INIC, C++
EditBinary.INIFor the editing of binary files
HTML.INIHTML, SMZ (SIMPOL Server Pages)
IDL.INIIDL (Interface Description Language)
JScript.INIJavaScript
ReadBinary.INIFor the viewing of binary files
SIMPOL.INISIMPOL
Superbase.INISBP programs, tokenized and ASCII
TEXT.INIBasic text files
VB.INIVisual Basic
VBSCRIPT.INIVisual Basic Script
XML.INIXML, XSL

IDE Help Assistant Files (bin\…)

simpol_ppcs.apiPPCS Component — PPCS-Based Database Client Access
simpol_ppsr.apiPPSR Component — PPCS Type 1 Database Server for SBME
simpol_sbme.apiSBME Component — Superbase Micro Engine (Single-user)
simpol_slib.apiSLIB Component — Shared library access (DLLs)
simpol_sock.apiSOCK Component &mdash TCP/IP Socket Client and Server support
simpol_utos.apiUTOS Component — File System, Directories, Files
simpol_utui.apiUTUI Component — Common Dialogs, Message Box, etc.
simpol_wxwn.apiWXWN Component — wxWidgets-based Windows, Forms, Form Controls, Dialogs, …

Runtime Files for the ANSI Editor

OE70AS.DLL
VC6-RE200L.DLL
OT80AS.DLL
RWUXThemeS.dll
SF20AS.DLL
SYSTEM32\MSVCP60.DLL
SYSTEM32\MFC42.DLL
SYSTEM32\MFC42LOC.DLL
SYSTEM32\MSVCRT.DLL
SYSTEM32\MSFLXGRD.OCX

Runtime Files for the Unicode Editor

OE70ASU.DLL
VC6-RE200L.DLL
OT80ASU.DLL
RWUXThemeSU.dll
SF20ASU.DLL
SYSTEM32\MSVCP60.DLL
SYSTEM32\MFC42U.DLL
SYSTEM32\MFC42LOC.DLL
SYSTEM32\MSVCRT.DLL
SYSTEM32\MSFLXGRD.OCX

Runtime Files for Linux (linux\…)

libsbsort01.soSort library used by various SIMPOL database library components.
libsmdbg.soDebugging library used by the debug versions of the runtime programs.
libsmpol.soSIMPOL main language library.
libsmpolcgi.soSIMPOL CGI library used by the smpcgi program for running web applications.
libsmpollxml.soSIMPOL XML library used by the SIMPOL DOM support library.
libsmpolppcs.soSIMPOL PPCS library for client database access using PPCS type 1.
libsmpolsbme.soSIMPOL SBME database library for single user database access to the new database engine.
libsmpolsock.soSIMPOL SOCK library that provides TCP/IP client and server sockets support.
libsmpolutos.soSIMPOL UTOS file system utilities (directory and directoryentry objects).
smprunSIMPOL program launcher.
smpd1_SIMPOL program launcher with debugging information for handling errors that cause a program to halt.
smpcgiSIMPOL CGI program launcher.
smpd1_SIMPOL CGI program launcher with debugging information for handling errors that cause a program to halt.

The Linux files will eventually be placed in a Linux installer but for now we haven't done so. The lib files should all be placed somewhere like /usr/lib or /usr/local/lib. The program launchers: smprun, smpcgi, smpd1_, and smgd1_ should be placed in /usr/bin or /usr/local/bin. They also may need to be marked as executable (chmod a+x).

The Rest

The remainder should be self-evident. We haven't listed the include files, library files, samples, or projects, since this has gradually become so much that it would take far too much effort to maintain.

Library Code

There is a growing amount of library code that can be used in your programs. Currently most library code is provided as pre-compiled libraries and have an SML file that can be linked into your program. These files are found in the \lib directory. The source code for the libraries (fully commented!) is in the \projects\libs\ folder. An SML does not have a function main(), but otherwise can be a complete program with constants, types, and functions. For functions and types to be visible outside of the SML module, they must be declared with the export keyword. In the Project->Settings menu there is a place to select the modules used in a project. These will be statically added to the resulting SMP in the \bin directory of the project. As an alternative, they can be dynamically loaded using !loadmodulefile().

It is possible to use the SML (SIMPOL compiled library) for chunks of code that are common libraries. This will reduce how long your compile times take since if you use a module instead of adding it in as a source include, the module won't be recompiled each time.

CGI-Specific Issues

In the project settings is a place to create additional targets. These targets (once defined) can also include (next to them) a shebang line. Win32 shebang lines are important for use with Apache on Win32 or under Linux, if using IIS, they are unnecessary (but won't cause any trouble). With IIS, you have to set up the file extension in the server settings after which it will automatically invoke the correct program. At the end of the shebang line the appropriate new line character(s) must be include, and which should look like:

#!C:\Program Files\SIMPOL\bin\smpcgi32.exe{d}{a}

The {d}{a} is the same syntax as is used in SIMPOL itself in strings to represent non-printing characters (or characters not available on your keyboard) and is the carriage-return and linefeed characters. On Linux, only the linefeed should be used. Below is a typical Linux shebang line:

#!/usr/bin/smpcgi{a}

To enable the Server-Page style editing mode in a project, open the Project Settings dialog and click the CGI Project checkbox. Then it is possible to add a server page below the Server Pages folder (right click->New Server Page). This file will have an extension of SMZ. When compiled, it will have the same root name with an SMU or SMA extension. The resulting file still needs to be included into the main program (unless you named it the same as the main program). In the SMZ file, you work just like with ASP pages. You work in HTML (and can view it using the viewer button on the toolbar). The program code is in special comments, like that below:

<%'--------------------------------- begin code ---------------------------------
// hellocgi.sma - This is a simple Hello World program for SIMPOL Server Pages
//
// Author: Neil Robinson

constant CRLF "{d}{a}"

function main(cgicall cgi)
  string s

  cgi.output("Content-type:  text/HTML" + CRLF + CRLF,1)
'---------------------------------  end code  ---------------------------------%>

<HTML>
<BODY>
  Hello CGI World!!

<%'--------------------------------- begin code ---------------------------------
  cgi.output(cgi.getvariable("QUERY_STRING") + CRLF, 1)
'---------------------------------  end code  ---------------------------------%>
</BODY>
</HTML>
<%'--------------------------------- begin code ---------------------------------
end function ""
'---------------------------------  end code  ---------------------------------%>

The above program code is then compiled to the program shown below before it is compiled into the resulting program.

'--------------------------------- begin code ---------------------------------
// hellocgi.sma - This is a simple Hello World program for SIMPOL Server Pages
//
// Author: Neil Robinson

constant CRLF "{d}{a}"

function main(cgicall cgi)
  string s

  cgi.output("Content-type:  text/HTML" + CRLF + CRLF,1)
'---------------------------------  end code  ---------------------------------
    cgi.output("" + "{0D}{0A}", 1)
    cgi.output("<HTML>" + "{0D}{0A}", 1)
    cgi.output("<BODY>" + "{0D}{0A}", 1)
    cgi.output("  Hello CGI World!!" + "{0D}{0A}", 1)
    cgi.output("" + "{0D}{0A}", 1)
'--------------------------------- begin code ---------------------------------
  cgi.output(cgi.getvariable("QUERY_STRING") + CRLF, 1)
'---------------------------------  end code  ---------------------------------
    cgi.output("</BODY>" + "{0D}{0A}", 1)
    cgi.output("</HTML>" + "{0D}{0A}", 1)
'--------------------------------- begin code ---------------------------------
end function ""
'---------------------------------  end code  ---------------------------------

If you now wish to extend the program code, modify anything within the begin code and end code sections. When finished editing, right-click the program file in the project tree and select Regenerate Server Page. That will then rebuild the changes into the server page.

This design allows you to use the tools most appropriate for each portion of the server page. HTML syntax highlighting and preview for HTML coding and SIMPOL highlighting and intellisense-like features for SIMPOL coding.

CGI Debugging

To do this, use a shebang line like this if using Win9x:

#!/program files/simpol/bin/sbngide.exe /d{d}{a}

or this if using NT, 2000, or XP:

#!/program files/simpol/bin/sbngidecaller.exe{d}{a}

The first version will open the project in a new copy of the IDE and allow you to debug it. In order to return the final page to the web browser, it is necessary to close the new copy of the IDE. Also, the project is opened read-only.

The second version can use an existing copy of the IDE that is already running, so it will work in the same copy that you are working in. When the program finishes it is not necessary to close the IDE, the page is automatically passed back when the program ends.

Please note that the above instructions apply to using Apache on the local machine as a local web server for debugging purposes. Using IIS is possible but more complicated, since the association must be set up for the file name extension rather than being picked up from the file header as Apache does. Also, it is not possible to source-level debug ISAPI and Fast-CGI programs. It is best to debug them as CGI and then deploy in the other formats.

Currently debugging can also be done using the debug versions of the smprun32.exe and smpcgi32.exe programs, which will normally create a dump if the program exits with an error. If you run with the debug version of the CGI runtime then when an error occurs it creates a file called *.SLG in the same directory, which is very helpful since it contains the reconstructed source of the function where the error occurred and an arrow pointing at the line that caused the problem. It is still often helpful to use fsfileoutputstream to output information to a log file.

Constants

The syntax for a constant in SIMPOL is:

constant identifier "string"

or

contant identifier 1234

There is currently no support for decimal constants nor for negative constants. To place non-printing or other high Unicode characters into a constant use curly braces and hexadecimal values as follows:

constant crlf "{d}{a}"

or

constant CRLF "{d}{a}"

To enter a left curly brace use: "{{"

Gotchas

Whenever you start working with a new language you will hit a few things that are easy to forget. Here is a list of some of the one's that we have already bumped up against:

  1. Many methods (most of the file access methods in fact) take an error object reference. If you don't use it and you get an error, your program halts. You need to pass an initialized object, not just a variable name.
  2. When converting SBL code, watch out for = and ==. == is the test for equivalency. = is the assignment operator. There is a difference.
  3. Currently variables initialize to .nul. That is not the same as "" or 0, it means "no object". In SIMPOL everything refers to either an object or .nul. An object can also have a value of .nul, this is different from having no object. The .nul and .inf are special values of their own, and if you add anything to it the result is also .nul or .inf, so if you forget to initialize a variable and your program acts funny, you will understand why! We intend eventually to make this an option that can be set in the IDE, so that you can decide what the various basic types initialize to at compile time.
  4. The backslash line continuation character works, even inside of strings, but only if it is the last non-whitespace character on the line prior to the end of line character. Also the backslash line continuation character does not apply if the line is a double slash comment. These are the only line-oriented features in the language.
  5. The date object has methods like dayinweek(). These items are methods, don't forget the parentheses! Also, method and object names are case-sensitive, as are all features in SIMPOL!
  6. Watch out when looping around retrieving records. You not only have to test for an error value, you have to remember to stop at the error 1000010 (end of file) but not consider it an error.
  7. Retrieving a field value from a record via PPCS from a Superbase SBF file can still result in a return value of .nul, unlike with SBL. Make sure that you test for this anywhere that this is likely to happen and respond in the code accordingly.

Using the IDE

The IDE is fairly complete. Any problems using the IDE should be reported. The IDE does not print in color (but you can save the code off as HTML and print that in color). The editor supports a wide variety of file types including tokenized and ASCII SBL! There are numerous project-level features, see the IDE documentation for more information.

The basic approach using the IDE is to create a new project. This will ask you for a project name (to be entered into a directory browser). This will then create a directory of that name, inside that another directory of the same name (for the main module of the project), and inside that it will create a file (SMA or SMU depending on which version of the editor you are using) with the same name.

If you are using components, then you must add the components to your project before the type names will color code.

Make sure that you click the Save All button or menu item, otherwise your project changes will not be saved!

When your file includes other files (using the include directive) these will always show up below the file from which they were included when looking at the project tree. If a file can't be found, because you haven't set up the include section of the project settings, then an icon with a red line through it will appear next to the file.

See some of the examples that we are including and try the projects out.

Command Line Arguments

These are expected to be received by the main() function as strings. There is no practical limit on how many you can pass. If you pass numbers, you will need to convert them using the .toval() intrinsic function to an integer or a number before you can make much use of them.

Debugging

In addition to the source-level debugging provided by the IDE, there are command line utilities for console programs and CGI programs. The way they are used is to run your program using the appropriate debug version of the loader program. That means that for console programs you use SMPD1_32.EXE to run your program instead of SMPRUN32.EXE (on Linux you would use smpd1_ instead of smprun). For CGI programs you would use SMGD1_32.EXE instead of SMPCGI32.EXE (on Linux use smgd1_ instead of smpcgi).

When an error occurs, in the CGI environment the reconstructed source code of the function that is currently executing will be output to a file called <filename>.slg with an arrow indicating the line that has failed. If for some reason it hits a line it can't reconstruct into source it will output a line of question marks. The line of source following this line is causing the problem so please send us just that line of source with a note about its failure to be handled. In the case of a console program the reconstructed source when an error occurs would look like this:

Running errortypemismatch.smp
    string lv1
--->lv1 = 0x1
    end function lv1


Elapsed time: 0.00
SMPOL error number 17
Finished

The original source was:

function main()
  string s

  s = 1
end function s

The names of the local variables are unknown to the program so it has to name them itself. It uses the convention of lv (local variable) and a number to enumerate the various variables. User-defined type names will be detected as will function names and built-in type names. This was the first step to providing a source-level debugger. We will eventually also provide a method of inhibiting this kind of dump in programs that are protected so that they can't be cracked by people trying things like bad data to cause an error.

Program Comments

In SIMPOL, any L-Value that begins with a single-quote (') or a double-quote (") character is considered to be a comment. It is technically a string, but since it is on the left rather than on the right of an assignment, it is assumed to be a comment. Also, strings do not have to be closed, the end of line will do that, just like in SBL or BASIC (this is still sloppy coding though ;-) ).

Also, any statement beginning with // will be considered a comment until end of line (backslash is not supported here as a line continuation character!). See also Ctrl-J and Ctrl-Shift-J in the IDE to comment and uncomment whole blocks!

Conclusion

Try things out. Explore. Most important, have fun! Any problems you hit should be discussed in the appropriate news group at news://news.simpol.com/sbng.*.

Neil Robinson
Technical Director
Simpol Limited