What's new in KCML 6.20
Records
- There is now support for a LOCAL DEFRECORD definition in a subroutine.
- There is a simplified notation for FLD of a FLD such that FLD(FLD(a$.b$).c) can be written as FLD(a$.b$.c). This allows records to be fully embedded in other records.
- A similar grammar allows reference to another record or array of records using its SYM. Here the secondary records are not part of the main record but DIMed separately. The main record has a numeric field containing the SYM of the secondary record whose fields can then be accessed using expressions like FLD(a$.b.c). This is effectively a shorthand for FLD(SYM(*FLD(a$.b))$.c). Arrays of secondary records are allowed and are accessed with a subscript notation such as FLD(a$.b<n>.c)
Libraries
The term module has been deprecated in favor of the word library thus MODULE ADD now becomes LIBRARY ADD. Both keywords may be used in a program but MODULE will be replaced by LIBRARY automatically when a program is saved.
The PUBLIC and PRIVATE keywords can be used in libraries to declare in DIM, DEFSUB, DEFRECORD whether the symbols are to be visible outside the library. Without these qualifiers the symbol is presumed to be PUBLIC and thus visible. Adding PRIVATE will guarantee that the symbol will not be visible to a program executing in the foreground or in another library. Programmers are encouraged to use PRIVATE wherever possible with code that can be encapsulated inside of a library and an explicit PUBLIC qualifier to define the functions, records and constants that make up the libraries public interface.
PUBLIC DIM is now used to define library variables replacing the COM convention of KCML 6.10 which is still supported for this release but which will be phased out in the next release of KCML.
There is a built in library containing DEFRECORD definitions for KCML constructs like $PSTAT and $MACHINE. It also contains some common $DECLARE definitions. This library is searched after all the explicitly loaded libraries so any of these definitions can be overridden.
Error handling
A new TRY/CATCH mechanism can be used to protect a block of statements from run time errors. This can replace ERROR DO and the deprecated ON ERROR statements. It supports nesting and the passing of errors up to outer handlers. Errors can also be thrown programmatically with the THROW statement.
New methods to help in the dynamic creation of forms. All the following may only be used in the Create event
New menu properties have been added to help the programmer:
Database
- The number of columns that can define a key has been increased from 8 to 16. This maximum value is defined by the built in constant _KDB_MAX_KEY_COLS. This is a change to the table type (now 7.3) and once a table has been opened by a KCML 6.20 system it cannot be used on an earlier version of KCML. The KI_INFO call for a path now returns extra bytes for these extra columns.
- Deferred opening in KI_OPEN will reduce memory. See below.
- The minimum length of a word search word can not be set to 2. Previously the minimum was 3.
- The maximum number of KDB handles has been raised from 512 to 1024. It is defined by the built in constant _KDB_MAX_HANDLES.
- KI_INFO can be used to get the integer value of a handle (in the range 1 to _KDB_MAX_HANDLES.
- KI_START_BETWEEN and KI_START_FIRST return a status of _KE_ENDOFRANGE if and only if the max_rows condition has been met. Hitting the table's last row before the range condition will result in the normal status of _KE_ENDOFFILE.
- Added KI_COMPFILE and KI_DCOMPFILE to compress and uncompress a file directly with having to read it into memory.
- Database I/O on Unix is now performed using the pread64() & pwrite64() APIs to improve performance.
Xerces XML parser
- KCML 6.20 will ship, where supported, with Xerces 2.7 which adds support for DOM3 serialization and for progressive parsing using SAX2.
- The requirement to run with either the -y switch or the USEMALLOC environment variable has been relaxed for a number of Unix platforms including Linux and AIX5. It is still required for Unixware.
Memory
- The memory used by KDB has been significantly reduced by introducing the concept of a deferred open on a table. The original KI_OPEN call merely checks that the table can be opened in the required mode but only minimal memory is used at this time. When the table is subsequently accessed then KDB will fully open the table which may require loading various 8kb pages into memory. Other changes in KDB should help to reduce total memory used.
- There are also improvements in memory consolidation following a LOAD or $SPACE.
- Memory mapped heap is now used on Linux, AIX, HP-UX & Solaris.
- New option added allowing the form definition to be edited by hand (File|Edit). NOTE: You should only use this option if you know what you are doing as it will cause the form to be re-created based on your changes.
- New option added allowing a list of screen sizes to be maintained (View|Screen Sizes). These screen sizes are drawn as part of the main editor window background (640x480, 800x600, etc.).
- New option added allowing form properties to be displayed (File|Properties), including the number of controls, the form size, etc.
- When using the Align|Space Evenly|Down option and dbedit controls on an editgroup are selected, they will now be spaced 16 DLUs apart, starting from the top of the first control. Any single-line dbedit controls that are not the correct height (13 DLUs) will be updated.
- When creating new dbedits on an editgroup or dragging columns from the table list onto an edit group, the new control will be aligned and spaced automatically.
- Added a new option that will resize certain controls to ensure consistency (Size|Reset Control Sizes To Default).
- Added a new option displaying the various accelerator keys used by the program (Help|Keyboard Map).
- The Display Control Extents option now works for controls on nested tabs.
- When creating a new control by selecting one from the palette and then clicking on the form, the correct default size will now be used, fixing a problem where a tiny control could end up being created.
- You can now drag multiple-columns onto a form from the table list. Controls will be created in the order they were selected and will be aligned/spaced automatically if dropped on an editgroup.
- You can add new columns to a form by double-clicking the column in the table list. The new column will be added below the last column added and will be aligned/spaced correctly.
- Dropping a dbedit control on top of another dbedit in will no longer get the parentage wrong.
- A new option (Edit|Options|Misc|Include editgroup contents when setting tab order) will suppress the display of tab positions for dbedits on editgroups when using the Edit|Set Tab Order option. This is to support an upcoming kclient feature that will automatically set the control order.
- When setting the tab order, you can now use Shift+Click to set the starting tab position.
- When displaying the tab order, menu controls and the status bar will no longer be included in the tab position count.
- When displaying the tab order, if a tab page only has one control, the control no longer has its tab position displayed.
- When displaying the tab order, clicking on the form background will now toggle tab ordering off.
- Added a new option, Tools|Check Tab Order, which will display the current tab position of controls on the form, with incorrect tab ordering displayed in red.
- Added a new option, Tools|Auto Tab Order, which will automatically set the tab order on a form.
- It is now easier to click on an editgroup when setting the tab order for controls.
- When using the property list, you can now hit TAB to select the next control after you have changed a property.
- When selecting a dbedit control, the Label$ property will now be selected automatically (if the previously selected property doesn't appear in the list).
- When setting the Label$ property of a dbedit control on an editgroup, the dialog is now redrawn to fix a paint bug.
- The About dialog has been replaced.
- Anchor code changed to fix a problem selecting some controls (such as a frame on a tab for example). Anchored controls on tab pages will now be repositioned correctly when the tabs are sized.
- Added a new option, Tools|Control Events, that allows you to choose which events are set when creating new controls.
- When adding a tab control or frame to a new form, you can now simply click to create a control that will fill the form client area.
- When creating a new form, a dialog box is now displayed allowing you set form properties. You can choose the form size, frame options (menu, toolbar, status bar), which buttons to include, as well as creating some standard frame/tab controls.
- DBEdit controls on editgroups will now have their tab order set automatically. Controls will be sorted left to right and down.
- The screen size guide lines will now take the size of the menubar and toolbar into account.
- If you hold down the SHIFT key when selecting controls, each click will cycle through any controls under the cursor, making easier to select overlapping controls.
- When right-clicking on a tab control, the list of tab pages is now displayed on the menu, allowing easy access to hidden pages.
- When editing a form that has a menu, the menu control is no longer displayed. Instead, a special menu icon will be displayed in the forms caption bar. Simply click this to edit the menu.
- Added a new option (Edit|Options|Misc|Assume Large Toolbar Icons) that will ensure kform takes the size of a large toolbar into account when displaying the screen size guide-lines (and when creating a new form for a specific screen size).
- Added a new option (Edit|Grouping|Set Group Events) allow the events for any button groups to be set.
- You can now quickly copy a control by holding down the CTRL key whilst dragging an existing control. When the mouse button is released, the selected control will be copied and pasted to the new location.
- Menu items will now be checked for accelerators when exiting kform.
- Added a new option to kform32 (Size|Size to Fit) that allows a tab, frame or editgroup to be sized to fit the available parent client area. The control will be sized so it is 4 DLUs away from the nearest controls.
Connection Manager
- Now uses PAM, where supported, to authenticate a user.
- All kconf.xml directives, eg get_include, that require a pathname can now reference an environment variable.
- Can provide a Secure Network Connection between KClient & KCML
- Web server now supports HTTP caching
- Access control lists can be defined for each service.
- Improve performance by using memory mapping to read files.
- Can launch a KCML SOAP server, either directly or via Apache, see SOAP services.
Miscellaneous
- REDIM LET allows strings to be sized to exactly the right size. Also LOCAL DIM of a string to zero size is now supported. These can be helpful with rarely used error messages.
- Strings can be concatenated using the & operator when passed as an argument to a function.
- The %S descriptor in $PRINTF will not strip trailing spaces from strings.
- Access to the workbench is now conditional on the client computer having a suitable support licence.
- Setting STR($OPTIONS RUN, 61, 1) to 0xFF sets the current language to UTF-8 for the $PACK and $UNPACK UTF-nn conversions.
- The GOSUB keyword is not required when invoking a function via a SYM value. The SYM value of a function label will now persist across a LOAD.
- The RENAME OBJECT immediate mode command allows forms to be renamed or OBJECT variables to be renamed.
- $OPEN can now be used as a function returning a status value which can then be tested in a program. This avoids the use of a line number.
- $COMPLIANCE 3 forbids the use of line numbers as labels.
- Comments on the same line are now possible with the // form of REM.
- A new $PACK(E="META") format allows a string to be converted into a MetaPhone hash value as an alternative to Soundex when doing fuzzy matching of English surnames.
- OPEN # now supports SSL/TLS sockets.
- SOAP servers can now be independently licenced.
Compatibility
- KCML 6.20 will now expect to be able to evaluate fields at resolve time. If they are not defined in the current program then it will search the list of loaded libraries looking for a definition. In practice this is a change to the default value of byte 49 of $OPTIONS RUN which is now set to HEX(07) rather than HEX(00) as in previous versions. To be compatible with earlier behaviour you can reset this byte or set the OPTIONS_RUN_49 environment variable to "00"
- The KCML workbench will not be available unless either the server license file contains a support entry enabling for all users or unless the client has a client support licence enabling it.
- The kat and ucompile utilities are no longer supplied.
- SYM values and the handles allocated by KI_ALLOC_HANDLE are now encoded as large numbers rather than small integers and if packed into a field must be packed with the FP pack type. In previous version of KCML both these types of number were small enough to be packed using BIN(4). This is no longer the case.
All versions of KCML 6.20 have support for large filesystems and can address files greater than 2Gb. They are all compiled for 32-bit operating systems.
Operating system | Minimum version | Comments |
Windows | XP service pack 2 | |
Sun Solaris | 8 | Sparc processors only |
HP-UX | 11 | |
AIX | 4.3.3 | |
Linux | 2.4 kernel | E.g. Redhat 8 or later |
Unixware 7 | 7.1.1 | |
Unixware 2 | No longer supported | |
SCO Openserver | No longer supported | |
Compaq Alpha TrueUnix | No longer supported | |
See System Requirements for more informantion.
Client support
Kclient is available in two versions
- A Unicode enabled version that will only run on NT4, Windows 2000 and XP. This supports multiple code pages on a form.
- A localized client that understands a Unicode enabled server but is limited to the codepage used by that version of Windows. This version will run on all Windows implementations including Windows 95. Note that Windows 95, 98 and Me are limited in the complexity of the forms they can display as a consequence of resource limitations inside these versions of Windows.