To 'GUI' or Not to 'GUI'
If you have a mixed environment, with some users connecting with terminal emulation, and some with a GUI interface, it might be handy to be able to tell which interface is currently being used. Here are two techniques:
* Are we character or are we GUI (Presentation Manager)? * A presentation manager session has '-f=The above technique also demonstrates the use of RT_GETPARAM to check for arguments on the command line. TEMP 80 contains the parameter we are interested in ('-f' in this case). After calling RT_GETPARAM, TEMP 80 will either contain the data on the right hand side of '-f=', or it will still contain '-f' if '-f' is not found on the command line. This approach does not distinguish between the Java Client and the Presentation Manager client.
Another approach is:
PASS --- FEATURE TOKEN SCANLIST FIELD SHARE? Y CALL ,RT_CHECK_CLI_FEATURE RESIDENT? N END? N FAIL 0 IF --- RETURN CODE EQ +1 T It's the Java Client F It's notThis technique specifically tests for the Java client, and will return +0 if the user is character or Presentation Manager.
Testing for Numeric
Occasionally, we have to allow the user to enter data into an alpha field but we still need to verify that the field only contains numbers. One approach is to examine each byte of the field and checking to ensure that it's between 0 and 9. However, in release 4.2.4 and higher, there's a much better way of doing this check. When using the CNV TEXT to move an alpha to a numeric, APPX will set the T/F flag to F if the sending field is not numeric:
CNV TEXT --- XI = --- TEMP 132 F <field is not numeric>Text under Toolbar Icons
You can enable text and icons in the APPX toolbar. First, in the Client Preferences, [Options], set toolbarStyle=both. Then, in the GUI Attributes for Optional Children, append '@SST=<some text>' to the end of the label. If the Optional Child appears on the toolbar, the 'some text' will appear underneath the icon. Eventually there will be a better way of specifying this, but at the moment you can use this technique. For an example of this, enable the client preference, and go into Application Design.
Do you have a tip you want to pass on? Contact Us.