In this section and most of the documentation, we have chosen to use BASIC syntax in most of the examples. We hope that examples in this simple, Beginner's All-purpose Symbolic Instruction Code, will easy to translate into the code you are using. (If you have questions, call us. The actual version we used is AlphaBASIC, documented here.)
There are various types of items used for communication between the application program running on the server and the TrueGUI client running on the remote PC workstation. Commands are sent from the application program to the client program to perform specific actions. Data is returned from the client to the application program in response to these commands or to user input.
Commands from the application program to the TrueGUI client program:
1. Global commands that control client operation.
2. Display commands that display forms and controls on the client screen.
3. Data request commands that request various types of data from the client application.
All commands have one of three forms which follow closely the way VB works. Controls have "Fields", "Properties" and "Methods" (functions to us old-timers). You can set and get the value of any public field or property by using display and data request commands.
All three command types have several properties in common. They must be enclosed in curly braces to identify them to the TrueGui parser. There may be more than one command in a single PRINT statement. All <CRLF> characters are ignored between commands and are not required as command terminators. Commands may be sent in pieces as long as the curly braces are in their correct position in the resulting text stream.
If curly braces do not fit your programming style, you can change the command beginning and ending identifiers with the following two TrueGui global commands:
{ TrueGui.BeginCommand=Character } - sets the current begin command identifier
{ TrueGui.EndCommand=Character } - sets the current end command identifier
It is valid to set both begin and end command identifiers to the same character if you so choose. As with quote marks for a string literal however, things can get a bit messy if you do not keep track of whether you are coming or going.
Note that the commands in the examples are shown with spaces between the curly braces and the command. This is done for clarity and you may include them or omit them at your preference. All white space between the curly braces is ignored except when inside a string value or argument.
Data from the TrueGUI client program to the application program:
1. Data items returned in response to a data request command
2. Events which indicate a user action on the client side such as entering text or clicking on a button.
The following sections will describe these items in detail.