| SATGUI Programming |
|
| Home | SATGUI | SATSHELL | SATFORM | SATFILTER | SATREPORT | SATMYSQL | License | Download | Examples | Contact |
SATGUI applications, on the whole, consist of two types of files:-
The Screen files must contain only SAT/DL commands, anything else will cause the SATGUI
client to generate an error. These files have a similar purpose to the HTML documents used
in Web applications.
The Process scripts/programs can also update the GUI interface by writing SAT/DL commands
to standard output. All Process standard output must be SAT/DL commands, anything else
will cause the SATGUI client to generate an error. These files have a similar purpose to the
CGI scripts used in Web applications.
The "main" Action
All SATGUI applications must have a "main" Action, which is the start/entry point to the
application. Although not mandatory, for most applications the "main" Action will have at
least a Screen file.
The "init" Action
Optionally, there may also be an "init" Action, which can be used to set-up the application
environment. This Action is performed once only, before the "main" Action, when a user connects
to the application. It may be used, for example, to set-up "Translations"
and application specific validations. Although Process
files may be used in "init" Actions, for most applications the "init" Action will have a Screen
file only. Remember: a Screen file doesn't actually have to update the screen. It may contain any
SAT/DL commands, not all of which effect the display.
When to Use the "unlock" SAT/DL Command
When an action is invoked the screen is locked and the clock/hourglass cursor is displayed.
If the action has a Process which generates SAT/DL commands, the screen will unlock automatically
when the process has finished. If the Action has a Screen only, then it will be necessary to
include an unlock command at the end of the Screen file. If the
Action has a Process which does not update the screen, then the Process must generate the
unlock command, otherwise the screen will remain locked.
As a rule: Every Process should gernerate at least one SAT/DL command.
Positioning Display Items
Display Items (Buttons, entry fields etc) are positioned using an absolute "x,y" coordinate
system.
The "x" position is in columns (numbered from zero), where one column is the average width of a
character in the default font used for a label. The "y" position is in rows (numbered from zero),
where one row is the line spacing in the default font used for a label.
Passing Parameters to Actions
Parameters passed to Actions maybe either value of a SAT/DL item (For example: Data, Entry,
Radiobuttons) -or- a literal (Constant) value. Item values are generaly passed by using
the name of the item. Checkbuttons also require the button label to be specified (See
addCheckbuttons).
Literal values are enclosed in single quotes and must not contain spaces.
Examples
SATGUI Programming Basics/Guidelines
The combination of Screen and/or Process constitutes a SATGUI Action.
{myaction1 first_name last_name}
{myaction2 order_code 'print'}
{myaction2 order_code 'fax'}
{myaction3 customer order:urgent order:customer_collect order:invoice}
...The first example passes two item (variable) value parameters. The second and third
examples show how the same Action process can be called in different modes, by passing
literal (constant) values in addition to item values. The final example shows how
Checkbutton values are passed.
Copyright © 2003 Adrian Davis.