| SATGUI Reference |
|
| Home | SATGUI | SATSHELL | SATFORM | SATFILTER | SATREPORT | SATMYSQL | License | Download | Examples | Contact |
| Layout of SATGUI Applications |
The base directory for a SAT application must be defined in an exported environment variable called SATHOME. Under this directory the following directories must exist:-
| $SATHOME |
config log process screen |
Application configuration files. Server log files. Processes associated with interface actions. Screen definition files. |
| Configuration |
Under the config directory the following files must exist:-
|
config profiles users |
Application configuration file. User profiles. User login information. |
Example:
#==========================# # Demo application config. # #==========================# title="Demo" # Application window title. port=9881 # Application server port. security="on" # Application prompts for user/password.
This file is a source-run script used by the server startup script (satguistart). Therefore normal (Bourne/Korn) shell script syntax conventions apply. All configuration parameters are required.
The title will appear in the title bar of the application window.
The port number must be unique for the host/application. Which port numbers are free to be used will depend on the host. There are no hard and fast rules, but port numbers above 9000 are generally free.
When security is set to "on" users will be prompted for a user/password
when connecting to the application. When security is set to "off" users
will connect without authentication, provided that the following entries exist in the
users and profiles files:-
users
user:password:full:NP
Note: A default printer may be specified in place of "NP".
profiles
*:full:normal
Note: The access may also be set to "disabled".
The profiles file contains the user login profile configuration. Each user
must have a login profile assigned in the users file.
The profiles file must contain entries which identify each action
which specify for a profile, the level of access that the user has.
Format:
action:profile:access
profiles
| action | Name of action. |
| profile | Name of profile (String not containing spaces). |
| access | Access for profile to action (normal/disabled). |
There must be at least one entry which identifies each application action in this file.
When a user attempts to invoke an action the server checks to see if there is a matching profile specified for the action entry in the profiles file. If a match is found the default GUI state is set to the access value (normal/disabled). If no match is found, the server will display a red "Access Denied" message at the bottom of the application window.
Wildcards ("*") maybe used in the action and profile fields.
Example 1:
In this example three actions are defined (main, displayhost, addhost).
Example 2:
Remember: Where there is no matching profile the user has no access to the action.
NOTE: The access is passed as parameter 2 to the action process.
The users file contains the login details for the users to be allowed access
to the application.
Format:
user:password:profile:printer
main:full:normal
main:view:normal
displayhost:full:normal
displayhost:view:disabled
addhost:full:normal
main:*:normal
display*:full:normal
display*:view:disabled
print*:*:normal
This example uses wildcards.
users
| user | User ID (String not containing spaces). |
| password | Password (String not containing spaces). |
| profile | Profile (String not containing spaces). |
| printer | Unix name of printer to be assigned to the user (Specify "NP" if no printer). |
NOTE: The user is passed as parameter 1 and the printer as parameter 3 to the action process.
Example:
adrian:mysecret:full:printer01 john:verysecret:view:printer02 mary:keepquiet:full:NP satadmin:hush:full:printer01
This directory contains the application server log file.
The log filenames have the following format:-
This directory contains the action processes.
These files must contain executable code, and have execute permissions for the application user.
The server always passes the following parameters to a process:-
This directory contains the action screen files.
These files must contain SAT/DL commands only, and have read access for the application user.
| Application Screen Layout |
The "Application Title" is set using the configuration file, setTitle and newScreen.
The "Application Screen" is where the main application appears. The addDisplayItem commands create items (Entry boxes, buttons etc.) in this area.
The "Message Line" is set using setMessage. Some SATGUI internal facilities (Entry validations, permissions errors etc.) also write to the Message Line.
| Starting Application Server |
Make sure that SATHOME is set/exported with the correct path for the application.
Start the server by running the satguistart script.
| Starting Application Client |
satgui.exe host port (Windows)
satgui host port (Linux)
satgui.tcl host port (Source)
| host | Name of Unix host running application server. |
| port | Port used by application server. |
The best method to start the SATGUI client, under Windows NT/9x, is to set-up a desktop shortcut. The "target" for the shortcut should be something like:
"C:\Program Files\SATiSOFT\satgui.exe" myhost 9883
| SATGUI Development Tool |
The SATGUI Development Tool (SATGUITOOL) is a simple interactive tool to assist in designing SATGUI screen layouts. This is a stand-alone program which allows screen layouts to be tried on a PC/Workstation without the need to have an application server running.
When SATGUITOOL is started, using the Windows -or- Linux executables, two windows are created (TCL/TK programmers will recognise this!!):-
NOTE: The "Console" window may appear on top of the "Tool" Window.
SAT/DL commands entered into the "Console" will immediately update the "Tool" window. If actions are specified for buttons, entries -or- multi-list items, the action/parameters which would be sent to the server (if executed by SATGUI) are displayed in the "Console" window.
To start SATGUITOOL using the source code
To load/run files containing SAT/DL code
In addition to entering SAT/DL commands at the "Console" prompt, files containing SAT/DL code can be loaded/run using SATGUITOOL.