Title: How does a program detect at runtime whether it is running standalone GUI, thin client or with Web Direct 2.0?
To determine where the user interface is running, whether standalone (Java Swing), thin client or in a web browser (Web Direct 2.0), add the following to your program:

01 GUI-FACTORY-NAME PIC X(44) VALUE SPACES.
   88 IS-JAVA-SWING VALUE SPACES.
   88 IS-WEB-DIRECT-2-0 VALUE
      "com.iscobol.gui.client.zk.GuiFactoryImpl".
   88 IS-CHARACTER VALUE
      "com.iscobol.gui.client.charva.GuiFactoryImpl".

    ACCEPT GUI-FACTORY-NAME
      FROM ENVIRONMENT "guifactory.class".

and then you can test for the UI type using the condition variables. For example, to test for Web Direct 2.0:

    IF IS-WEB-DIRECT-2-0 THEN
       ...
    END-IF.

If IS-JAVA-SWING is true then use the following code to determine whether the Java Swing GUI is running locally or remotely via thin client:

    ACCEPT TERMINAL-ABILITIES FROM TERMINAL-INFO
    IF IS-REMOTE THEN
       ...
    END-IF


Authored by: Veryant Support on Mon, Sep 21st, 2009 at 7:00 PM
This question has been viewed 7662 times so far.
Online URL: http://support.veryant.com/support/phpkb/question.php?ID=106

Powered by PHPKB Knowledge Base Software