Upward compatibility issues¶
In order to fix bugs and occasionally, in order to make a substantial improvement to the product, it is necessary to make a change that might affect existing programs. The following is a list of upward compatiblity issues that exist in Sculptor.
The standard text files are constantly evolving. Always use the latest files in $SCULPTOR/text. If you translate these files into another language, use a standard file compare program to determine which files have changed. The export and import facilities in sctext/sctextw can be used to simplify the editing process.
UPGRADING TO SCULPTOR 6.0.0¶
The Sculptor commands begin_mark, commit_mark and rollback_mark were inconsistent as they used to define a transaction on a SQL database but not a Sculptor database. In Sculptor 6, begin_mark and commit_mark only write a marker to the transaction log file and rollback_mark is a null command that does nothing. If a transaction is required, the functions begin(), commit() and rollback() must be used.
Sculptor 6 clients require the Sculptor 6 server, which has internal version number 1.10 and will not connect to a Sculptor 5 server. The Sculptor 6 server accepts connections from Sculptor 5 clients.
UPGRADING TO SCULPTOR 5.8.0¶
Table cell events now honour the event_enable mask. This affects the events EV_FOCUS_CELL, EV_NOFOCUS_CELL and EV_VALIDATE (for table cells).
Programs compiled with scc version 5.7.x or earlier will work as before.
Programs compiled with scc version 5.8.0 or later must include sculptor.h dated 1 February 2007 or later and a table that has an event_enable clause must specify EV_DEFAULT or all required events individually.
UPGRADING TO SCULPTOR 5.7.1¶
The following files can have kfclient and kfserver entries:
/etc/services (Unix) \WINNT\system32\drivers\etc\services \Windows\system32\drivers\etc\services
If there are no kfclient or kfserver entries in these files then it is sufficient to ensure that the kfserver release is the same or is later than all Sculptor clients.
However, because of a bug fix in Sculptor 5.7.1, if you do have kfclient and kfserver entries in the services files, you must use ensure that the the Sculptor client and server versions are compatible by not mixing release 5.7.1 or later with 5.7.0 or earlier.
The seek # command is no longer ignored on a sequential file opened in update mode. This is most unlikely to cause a problem in existing programs, but if it does, change update to append and recompile.
UPGRADING TO SCULPTOR 5.6.3¶
Behaviour relating to the ODBC source string has changed:
Prior to 5.6.2, a blank or invalid source string opened the ODBC browse for source dialog.
In 5.6.2, a blank or invalid source string did not open the ODBC browse for source dialog.
In 5.6.3 Beta 2 and later, a blank source string opens the ODBC browse for source dialog but an invalid source string generates an error.
UPGRADING TO SCULPTOR 5.6.2¶
In a program compiled with scc 5.6.2 RC2 or later, a modal dialog on a window (dialog window_id) excludes all child windows with style WS_OWNED from that dialog. This is correct behaviour and has been implemented as a bug fix. However, this change may break some applications. To avoid this change, add
!compat owned=5 (or any number < 6)
to programs before recompiling them with scc 5.6.2 RC2 or later.
In a program compiled with scc 5.6.2 RC2 or later, the EV_DRAG… events now return the X and Y coordinates in pixels if the program uses a pixel grid and in characters if the program uses a character grid. Previously, these coordinates were always returned in characters. This has been implemented as a bug fix. However, this change may break some applications. To avoid this change, add
!compat dragchar=5 (or any number < 6)
to programs before recompiling them with scc 5.6.2 RC2 or later.
UPGRADING TO SCULPTOR 5.5¶
In a program compiled with scc 5.5 or later, a menu defined in a child window with style WS_OWNED now appears in the child window instead of the parent. If an existing program relies on this behaviour, the menu should be moved to the parent window before recompiling the program. If this is inconvenient, add or uncomment the line “!compat childmenu=4” in the standard header file $SCULPTOR/include/local.h.
UPGRADING TO SCULPTOR 5.3.1¶
The EV_RIGHT_MOUSE event function has been improved and has extra arguments. The change is upward compatible except for tables but since Sculptor 5.1 only provided table relative, pixel co-ordinates, it is unlikely that any Sculptor 5.1 programs uses these co-ordinates for tables. Full details are in the file new.
The EV_RIGHT_MOUSE event is now sent on mouse up, not mouse down. This event code should be regarded as obsolescent. The event code EV_RIGHT_MOUSE_DOWN or EV_RIGHT_MOUSE_UP should be used instead.
UPGRADING TO SCULPTOR 5.3¶
The behaviour of the left and right arrow keys in textbox groups during a dialog has changed. In programs compiled with scc 5.1 or earlier, these keys move to the previous or next textbox in the group. In programs compiled with scc 5.3 or later, these keys stay in the same textbox unless a “!compat arrowkeys=N” (N < 5) is added to the program.
This note applies to programs that are compiled with scc 5.3.0 or later. For tables with mode EM_MULTIPLE, the event EV_MULTIPLE_SELECT is now sent instead of several EV_SELECT events when Shift+Click is used to select a block of lines. The recommended option is to modify existing code to process the EV_MULTIPLE_SELECT event before recompiling. This is a simple change. If the program must behave exactly as before, add “!compat evselect=4” to the program but note that multiple select events are then not reliable with tables whose source_object is a file. Please read the Sculptor 5.3.0 section in new for information on how to process the EV_MULTIPLE_SELECT event.
UPGRADING TO SCULPTOR 5.1¶
Check programs that use the begin, commit and rollback commands. These must be changed to begin_mark, commit_mark and rollback_mark or to the functions begin(), commit() and rollback(). See new for details.
Security features have been added to kfserver and kfservnt. These are documented in the file security.txt. The new versions of kfserver and kfservnt will not work until you copy the supplied SCULPTOR/security directory to your server. For backward compatibility, this security database is supplied with a single, default entry that permits all operations. To implement secure server operations, delete this entry and add specific entries as required..
Programs that use editable tables will not run on Sculptor 5.0 once they have been recompiled with scc version 5.1.0 RC2 or later.
The EV_SELECT (=EV_SINGLE_CLICK) event for a graphic is now sent after the previous control has lost focus.
In Sculptor 5.1 (release version), the command “clear record_id[subcript]” is interpreted correctly and clears the specified element of array fields in record_id. Non-array fields are not cleared. Locked records are not unlocked. This command was not defined in earlier versions of Sculptor but the compiler accepted it. Earlier interpreters ignore the subscript and clear the entire record. They also unlock the record if it is locked. The behaviour is independent of the version of scc used to compile the program, so use this syntax only if the program will not be run with a pre-Sculptor 5.1 version of the interpreter.
UPGRADING TO SCULPTOR 4.3 - 4 September 2000¶
UPGRADING TO SCULPTOR 4.2 - 28 March 2000¶
If wintask is declared as -wintask and the program is compiled and run using Sculptor version 4.2, then it is no longer created when the program starts. To retain the old behaviour, uncomment the following line in <local.h>:
!compat create_wintask=3
open and close listbox_id now open and close the drop down list unless “!compat open=3” is specified in programs compiled with scc 4.2. The file <local.h>, which is included by <sculptor.h>, contains the line “!compat open=3” so that programs will work as before. Remove this line in order to use the new feature and use show and hide to make a listbox visible and invisible. It is recommended that show and hide are used instead of open and close with all controls.
In Sculptor 4.1, pressing the up arrow key on the top row or the down arrow key on the bottom row of a multi-row textbox that is in a textbox group, moves to the next textbox in the group. This does not happen with multi-row textboxes that are not in a group.
If Sculptor 4.2 is running a program that has been recompiled with scc 4.2, the focus stays on the current row whether or not the textbox is in a group. Although it is unlikely, this change could affect a program that has been coded to trap the lose focus event, check the keycode for an arrow key and scroll the textbox. To retain the old behaviour, uncomment the following line in <local.h>:
!compat textbox=3
The sample program $SCULPTOR/demo/misc/scroll.f demonstrates a better way to scroll multi-row textboxes.
The EV_KEYSTROKE event now receives all key presses, not just function and control keys. Ordinary keys send positive ASCII values. Special keys send negative codes as before.
A clause such as field_id[2 5], which contains an embedded space in the subscript, compiles in earlier versions of scc even though the syntax is incorrect. This now generates the error message “fatal flex scanner internal error - no action found”. This is a standard message from the lexical analyser that we use. We are investigating to see if a more meaningful error can be produced.
In the EV_VALIDATE event, sys.CurrentControl is now control that will receive focus if the validation is succesful and sys.PreviousControl is the control being validated. In Sculptor 4.3, sys.CurrentControl was the control being validated.
UPGRADING TO SCULPTOR 3.4c/4.1c - 16 March 1999¶
The latest Microsoft C compiler requires an updated version of the Windows socket library. The client/server version of Sculptor uses uses this library. Windows 95 systems must be updated by running the file WS295SDK.EXE. This is supplied on the Sculptor CD. Windows 95 service pack 1 should be installed before running this update.
The appearance of windows that have the style WS_INDENT or WS_PLAIN will change on GUI platforms. The appearance of static text that has the style WS_INDENT, WS_STANDOUT or WS_PLAIN will change.
UPGRADING TO SCULPTOR 3.4/4.1 - 5 October 1998¶
Although the print improvements made to Sculptor 3.4/4.1 should not affect existing reports, Sculptor recommends checking the layout of all reports, especially those that use pre-printed stationery such as cheques and labels.
The layout of tables has been changed so that both headings and data are taken into account when determing column width and the gap between each columns is smaller. These changes are necessary in order to make tables work with proportional fonts.
Many or all existing programs will probably look okay but in order to retain upward compatibility where necessary, the following rules are applied at run-time:
If the program was compiled with scc version 3.3 or earlier, the old layout is used.
If the program was compiled with scc version 3.4 (5 October 1998) or later, the new layout is used unless the table has the style flag WS_OLDLAYOUT. After recompiling an old program that uses tables, check the screen layout and if necessary, add WS_OLDLAYOUT to the table style= clause and recompile.
UPGRADING TO SCULPTOR 3.3/4.0 - 19 June 1998¶
Substantial improvements have been made to the print command when used with proportional fonts. Details are in the file new33.txt. Also, a bug has been fixed in which changing the value of sys.PageWidth sometimes failed to select the correct font. These changes could affect the layout of existing reports, mainly those which use proportional fonts. A quick check of all reports is recommended.
When a report was run to a specified window, an “End of report” prompt used to appear automatically. This could be a nuisance and has been removed. There is an upward compatibility issue only if the program closes the report window after running the report. In this case, add a prompt command before closing the window:
run report myreport to mywindow ppf="winpm" prompt "End of report" close mywindow
By popular request, a textbox that has the mode flag EM_READONLY set is no longer shown disabled. The style flag WS_DISABLED or the disable command can still be used to give a textbox a greyed appearance.
UPGRADING TO SCULPTOR 3.2 - 28 February 1998¶
scc generates an error if the the obsolete names ->xpos and ->ypos are used. These must be changed to ->xcreate and ->ycreate.
When fields of type n4.x and n8.x where x > 0 were assigned to alpha fields, the decimal point was not correctly placed. This has been fixed. Any code which worked around this bug may need to be changed.
!database has changed to +|-database. The syntax of the database declaration has also changed. See item 14 in NEW LANGUAGE FEATURES.
The function server_time() now has a fifth argument. Existing code must be modified. The new syntax is:
server_time(server_name, date, time, systime, localtime)
Release 1.1 of kfserver and later support the localtime argument. If an older version of kfserver is running, localtime is returned equal to systime.
scc generates an error if the obsolete window style WS_MODAL is specified. Delete this style from any programs which use it.
The method of calculating the position of both top-level and child windows in Sculptor 3.2 has changed in order to fix bugs in the GUI version where a window at 0,0 was in the wrong place. This change has little effect on GUI but on character windows a child window with a border is now one row right and one column down from its position in Sculptor 3.1. These windows should have 1 subtracted from their x and y coordinates. As a temporary measure, on character windows only, they can be placed in the Sculptor 3.1 position by setting the environment variable SC31XY=1.
Beta versions of Sculptor 3.2 used a complex algorithm to determine the pixel width of an alpha textbox with a proportional data font. As a result, it was impossible to position a second, unlabelled textbox such that it started at the end of the first textbox. This algorithm is now used only if there is no width= clause in the textbox definition. If there is a width= clause, the pixel width is an exact multiple of the average character width. The beta version behaviour can be forced for all textboxes by setting the environment variable SC32AW=1. This should be regarded as a temporary measure. It is better not to set SC32AW and to set the width= clause to a suitable value.
Interpretation of the format of an elapsed time field has been improved. For example, it is now possible to use M:SS to obtain a single minute digit (previously the M was printed) and to use mM:ss to obtain blank when zero but otherwise force a leading 0 in the minute field. It is unlikely that these changes will affect existing programs but any that use elapsed time fields should be checked.
srep no longer issues an automatic form feed at the end of a report. This is correct, otherwise a blank page is forced on some print systems. If a form feed is required, add one to the Reset Printer sequence (Standard Control Sequence 6) in the printer parameter file.
When a run report command is executed, the driving file is now rewound before the !init code is executed. In earlier releases, it was rewound after the !init and !title sections. This was not compatible with Sculptor 2 which allowed the driving file to be positioned in the !init section. Programs which build a temporary driving file in the !init section must rewind it.
Multi-row, free format textboxes now store a user entered newline (see NEW LANGUAGE FEATURES in new32.txt). If, after input, the last non-space character in an element of the linked field is chr(13), the user entered carriage return. Elements which do not end with a carriage return are lines caused by automatic word wrap. When the text is redisplayed, user entered newlines are preserved but the rest of the text wraps to fit the width of the textbox.
Existing text which was stored before this feature was added will word wrap when it is redisplayed. If the user then adds newlines, these will be preserved.
Some bugs have been fixed which could hang kfserver. It is now much more robust. The latest version of Sculptor works only with the latest version of kfserver (1.2). A program will abort with an error message if an earlier version of kfserver is running.
The version of kfserver can be checked using Help->About (on Windows) or kfserver -v on Unix. The new version of kfserver supports old versions of Sculptor but this combination does not include the latest bug fixes.
The latest Microsoft C compiler links programs to a new Windows socket library (winsock 2). The run-time components for this library are standard on Windows NT but not on Windows 95. The latest versions of kfserver, sagewc and srepwc use this library. Windows 95 systems must be updated by downloading and running the file WS295SDK.EXE from the Microsoft web site ftp://ftp.microsoft.com/bussys/winsock/winsock2. It is also necessary to ensure that Windows 95 service pack 1 has been installed.
Error 10044 or missing DLLs ws2_32.dll, ws2help.dll indicate that the system does not have winsock 2 installed.
A customer has reported that installing winsock2 or service pack 1 on Windows 95 can cause a GPF when the system is rebooted. The fix is to remove all password files (*.pwl) from the windows directory and re-enter the passwords after rebooting.
On MSDOS/Windows and Novell, Sculptor 3.2 uses a new record locking technique which makes it possible to read a record that has been locked by another user. This technique is NOT compatible with the one used in Sculptor 2.5 and earlier. If you mix Sculptor 2 and Sculptor 3 programs on these platforms, you must use Sculptor 2.5a or later.
The EV_KEYSTROKE event is documented as supplying a negative keycode value for special keys (control keys, function keys, etc) but recent versions of Sculptor have actually returned a positive value. This version returns a negative value in newly compiled programs and a positive value when running an older .g file. Before recompiling, check all event functions for EV_KEYSTROKE. The following example shows the correct code:
!function MyEvent(EventCode, Object, KeyCode) { if (EventCode = EV_KEYSTROKE) { switch (KeyCode) { case = -F4: /* Code for F4 key */ break case = -F5: /* Code for F5 key */ break } } }