Data request commands are sent to the client to request the return of a data item of information. The TrueGUI system will then return the item of information in string form from the client program. As with all other TrueGUI commands, data request commands must be enclosed in curly braces to identify them to the TrueGUI command parser.
Data request commands are similar in syntax to the display commands but replace the assignment equal sign with a question mark (?) to indicate that the specified property data item is being requested instead of being set to a new value:
{ Control-Specifier.Property? }
Control-Specifier - identifies the form or control being referenced (See Control Specifier).
Property - the name of the control's property being requested (Width, Height, Name, Text etc).
Data request commands are usually sent out as the prompt string of an INPUT LINE command (in AlphaBasic):
INPUT LINE "{ MyForm.textBox1.Text? }", TgReply$
Alternatively, the data request command could be sent out as a PRINT statement followed by an INPUT LINE statement without a prompt, if this is more convenient. Thus, the following two statements would have the same result as the above INPUT LINE statement:
PRINT "{ MyForm.textBox1.Text? }"
INPUT LINE TgReply$
Data request commands cause the TrueGUI system to return a Data Item that usually has the format:
2DataValue<CRLF>
The first character is a 2 and the DataValue will be the text that is currently in the TextBox1 control. This response item is returned as a single ASCII text line, keeping much of the overhead down. With AlphaBASIC, the variable TgReply$ can be overlayed with two variables - a one byte TgType$ and the rest as TgText$ - so no additional parsing is needed at this point. Many other business languages have similar features. At the worst, the string must be "split".
Please note that you can use your program variables when requesting data. The language we are using for illustration, AlphaBASIC, does not allow variables in the INPUT prompts. This is a function of the AlphaBASIC programming syntax and not TrueGUI. You can use string variables as part of PRINT statements.