The following tables summarize the issues that you may face in converting your applications. They are divided into three categories:
GUI Applications
Character Applications
Table 5-1 Configuration
Data dictionaries
Run dd5upg to create a Prolifics data dictionary (data6.dic) and, optionally, an LDB (ldb.lib). Set SMLDBNAME = new name if you have not named it ldb.lib.
data6.dic
ldb.lib
=
new name
Groups
Groups are not loaded as part of repositories and LDBs. Hence, groups must be reestablished via the screen editor.
Key files
New keys have been added.
LDB Initialization Files
Perform one of these actions:
sm5ldb.c
sm5_ldb_init
Move SMININAMES from the setup file to either environment or sm_ininames call.
SMININAMES
sm_ininames
Edit the file by changing: "field" "value" to field="value"; include this file in your startup JPL code.
Remove these fields from the data dictionary and make them global JPL variables.
Menu bar files
Run m2asc -c to convert to Panther format.
m2asc -c
Message file
Fold in changes made to JAM 5 message file.
SMVARS and SMSETUP
SMVARS
SMSETUP
Fold in changes made to JAM 5 files.
DBI4COMPATIBLE is no longer supported.
DBI4COMPATIBLE
Video file
While the format of these files remains the same, the content of the Panther files might be different, resulting in different appearance (e.g. graphic characters).
screen libraries
Extract all screens from the library. Run f5upg on each screen. Reconstruct the library.
f5upg
Italics indicate options that are supported for backward compatibility only.
Table 5-2 Executable
Block mode
Not available in this release.
Memory-resident screens
Run f5to6 on the original screen. Run bin2c. Re construct the header file.
f5to6
bin2c
funclist.c
Fold in changes made to your JAM 5 funclist.c.
If your application does not routinely enclose each function argument in quotes, turn off the DEREF_ARGS flag in SM_INTFNC, SM_STRFNC and SMDBLFNC macros (see SM_OLDFNC) to turn off dereferencing of field names on function call lines.
DEREF_ARGS
SM_INTFNC
SM_STRFNC
SMDBLFNC
SM_OLDFNC
Makefile
Use the supplied makefile, folding in changes made to your JAM 5 makefile. Compare your JAM 5 file with the distributed JAM5 file to discover your changes.
Main routine
Use the supplied jmain.c, folding in changes made to your JAM 5 jmain.c. Compare your JAM 5 file with the distributed JAM5 file to discover your changes.
jmain.c
Table 5-3 Library Functions
sm_bkrect
Obsolete, but still supported.
sm_blkinit
Block mode not supported.
sm_blkreset
sm_i_bitop
Fails on array fields.
sm_c_keyset
Soft keys not supported.
sm_dicname
Link your application with sm5ldb.c.
sm_do_region
sm_edit_ptr
Use sm_prop_get.
sm_emsg
Use sm_femsg.
sm_err_reset
Use sm_ferr_reset.
sm_getjctrl
sm_initcrt
Use sm_jinitcrt.
sm_jinitcrt
sm_jplload
Use sm_jplpublic.
sm_keyset
Soft keys not supported, use menu bars instead.
sm_kscscope
sm_ksinq
sm_kson
sm_ksoff
sm_lclear
sm_ldb_hash
sm_ldb_init
sm_ldbrevive
sm_ldbsave
sm_lreset
sm5ldb
c
sm_r_menu
Link your application with sm5mbar.c.
sm5mbar
sm_d_menu
sm_c_menu
sm_mnadd
sm_mnchange
sm_mndelete
sm_mnget
sm_mninsert
sm_mnitems
sm_mnnew
sm_mnutogl and jm_mnutogl
sm_mnutogl
jm_mnutogl
Menu and input modes are no longer relevant. Push buttons (formerly menus) always execute an action when activated, and can be tabbed into from other fields. To restore JAM 5 behavior, set AUTO_TOGGLE = AT_DISABLE in the setup file or call sm_option.
AUTO_TOGGLE = AT_DISABLE
sm_option
sm_perm_emph
No longer supported.
sm_putjctrl
Use sm_prop_set.
sm_qui_msg
Use sm_fqui_msg.
sm_rd_part
Link your application with sm5strct.c.
sm5strct
sm_rdstruct
sm_rrecord
sm_skinq
sm_skmark
sm_skset
sm_skvinq
sm_skvmark
sm_skvset
sm_submenu_close
Use menu bars instead.
sm_wrecord
sm_wrt_part
sm_wrtstruct
Table 5-4 JPL
Comments
The : character is no longer supported for comments.
Keywords
Panther introduces the following new keywords:
double
global
string
send receive
runreport
tpi
For ease of recognition, avoid using these as program variables.
Loop variables
These are no longer floating point numbers (e.g. JAM 5 = 1.00; JAM 6 = 1).
unload
An error is now generated when unload is issued for a file which was not previously loaded. Use call sm_jplunload... to restore JAM 5 behavior.
sql
Obsolete. Use dbms query and dbms run instead.
Table 5-5 Screens
Circular arrays
Arrowing down past the last occurrence places the cursor in the first element and displays the first occurrence there. Arrowing up past the first occurrence places the cursor in the last element and displays the last occurrence there. JAM 5 did not reposition the cursor.
Cursor up/down
Panther positions the cursor at the end of existing data by default when entering a widget. To restore JAM 5 behavior, set IN_RESET = OK_NORESET in the set up file or call sm_option.
IN_RESET
OK_NORESET
Field function flags
K_KEYS always set to K_NORMAL on K_ENTRY.
K_KEYS
K_NORMAL
K_ENTRY
Group navigation
In Panther, TAB and BACK position the cursor to the next field by default. To restore JAM 5 behavior, call sm_keyoption and set the TAB and BACK key bits to VF_GROUP | VF_CHANGE.
BACK
TAB
VF_GROUP
VF_CHANGE
Group function flags
The MDT bit is not set when a member is selected. K_KEYS is always set to K_NORMAL on K_ENTRY.
Menus with control fields
Control fields are replaced by the control string property. There are two possible conversions via f5to6. The first is to use f5to6 -5 to retain control field functionality via the Release 5 widget type. The second is to use f5to6 -c to set the Control String property from the control field data, provided that its number of occurrences matches that of the menu field. Code that modifies the control fields must be changed to call property API functions.
f5to6 -5
f5to6 -c
Menus with return codes
To push back a key, call jm_keys from the control string property.
jm_keys
Multiple range edits
New widgets may only have one range. Use the validation function for complex range evaluation.
Submenus
Tabbing order
Panther uses the alt_next_tab_stop property only when the field specified in its next_tab_stop property does not exist. If the next field is protected, then its designated next field is used. To restore JAM 5 behavior, set JAM5_COMPATIBLE = JAM5_ON in the setup file or call sm_option.
alt_next_tab_stop
next_tab_stop
JAM5_COMPATIBLE
JAM5_ON
Scrolling date/time fields
All occurrences in a scrolling array with a system date/time edit will fill with data once they are allocated. In JAM 5, only the first element was filled.
Soft keys
Soft keys are not supported.
f5to6 -m copies the keyset name into the menu bar property.
f5to6 -m
Zoom
If you map the NL key to TAB, you will not be able to add new lines at the end of an array. Use insert key instead. Remap NL to NL before invoking zoom.
Table 5-6 Processing
AUTO key
AUTO
In Panther, this event occurs after entering first field. In JAM 5 it occurred before.
Custom executive
If menu return codes are used, call jm_keys and sm_keyoption to change key routing.
sm_keyoption
Key remapping
Mouse clicks generate NL and DELE keys which will be remapped as if they had been entered from the keyboard. Use a default field function to reset remappings on entry and restore them on exit from menu fields.
NL
DELE
Menu vs. input mode
Screen entry/exit hooks
Activation on expose/hide is now the default. To re store JAM 5 behavior, set EXPHIDE_OPTION = OFF_EXPHIDE in the setup file or call sm_option.
EXPHIDE_OPTION
OFF_EXPHIDE
Status line hook
Does not get called for messages now displayed via sm_message_box. Use ERROR_FUNC to trap all messages excluding setbkstat, d_msg and query.This event takes place before translation of % escapes.
sm_message_box
ERROR_FUNC
setbkstat
d_msg
Table 5-7 Menu Bar
empty items
No longer supported. Panther displays the parent button when a child menu has no recognizable contents.
title
No longer supported. It will not appear on menus.
Table 5-8 Utilities
dd2struct
No longer supported. Use the d2rec utility to generate record definitions.
d2rec
f2asc
Text format changed.
f2struct
No longer supported. Use f2struct supplied in sample code.
f2tbl
lstform
menu2bin
Replaced by m2asc. Text format changed.
modkey
Replaced by showkey utility. Since key file formats remain the same, the JAM 5 utility may still be used for those keys that aren't new.
term2vid
text2form
Not available in this release. Use the JAM 5 utility and load the generated screens directly into Panther or pass them through f5to6 for conversion.
Table 5-9 Configuration
Environment variables
In Motif, XNLSPATH may be required for some implementations.
XNLSPATH
Color aliases
Color aliases currently defined in resource files must be moved to the JAM configuration map file. To mimic JAM 5 behavior, set the Color Type property for all widgets and screens to Scheme and either re move [Scheme] settings from the configuration map or set all BG and FG scheme colors to GUI equivalents (e.g. XJam.Background).
Table 5-10 Screen, general
Automatic widget type changes
The JAM/Pi widget conversion algorithm formerly determined widget types based on protection. In Panther, widget types do not change at runtime. Therefore, changes in protection do not change widget type.
Blank push buttons (menu fields)
Blank push button widgets are no longer invisible. If you want widgets to disappear and reappear, use the following code:
In JPL:
field-spec->hidden = PV_YES
field-spec->hidden = PV_NO
In C:
id = sm_prop_id (field-spec);
sm_set_prop (id, PR_HIDDEN, PV_YES);
sm_set_prop (id, PR_HIDDEN, PV_NO);
A more GUI-like behavior is to make the button in active by toggling its active property.
Button label text
In Motif, the label is centered based on resource settings. In Windows, the label is always centered.
Table 5-11 Screen, Pi extensions
colorpriority
Sets the Color Type property of Foreground and Background to Scheme.
frame, box
Margin no longer supported.
hline, vline
May need to be repositioned.
hoff, voff
Not converted.
iconify
Iconifies a screen even if there is no icon specified.
list
Default horizontal and vertical scroll bars translated to no scroll bars.
multiline
These are converted to push buttons, and the additional text is truncated.
multitext
noadj
Colon expansion is no longer supported.
nomove
space
Colon expansion
Colon expansion of variables might not occur at the same time as in JAM/Pi,
Widget position
The Panther positioning algorithm may change widget positions. Inspect your converted screens and make appropriate adjustments.
Table 5-12 Processing
Changing field colors
Calls to sm_chg_attr that set field colors to match the screen colors (e.g. unhighlighted black) should be changed to set the colors to the expected color or to the container color (via the B_INHERITED attribute mask). JAM no longer automatically propagates screen colors to fields when the attributes match.
sm_chg_attr
B_INHERITED
Table 5-13 Library functions
sm_widget
In Motif, use sm_xm_widget. In Windows, use sm_mw_widget.
Also, the include files required by these functions changed to smmwuser.h and smxmuser.h.
smmwuser.h
smxmuser.h
sm_attach_drawing_func
In Motif: sm_xm_attach_drawing_func.In Windows: sm_mw_attach_drawing_func
Note that a 3rd argument for a user data buffer has been added to these functions.
sm_drawingarea
In Motif, use sm_xm_drawingarea. In Windows, use sm_mw_drawingarea.
Table 5-14 Screen
Clear on input
Field is selected if data is present.
The appearance of JAM 5 check boxes on Panther radio button and check box widgets has changed from _ to either ( ) or [ ]. The f5to6 utility at tempts to reposition the group so that brackets appear around the old check box position.
Because these extra characters are now considered part of the original field width, the initial text might be truncated by the conversion process, requiring you to manually reset the values.
f5to6 cannot automatically resize the widgets since it might cause unintentional overlapping of widgets or push widgets off the screen. Use f5to6 -5 to retain the old appearance through a Release 5 widget type.
Menu Fields
These are now push buttons so they are not set to reverse video when the cursor enters. Use f5to6 -5 to retain old behavior through the Release 5 widget type.