Configuration of WCI child programs

WCI children programs must attach to a parent container by giving the name of the container program:
 MAIN
    CALL ui.Interface.setName("custapp")
    CALL ui.Interface.setType("child")
    CALL ui.Interface.setText("Customers")
    CALL ui.Interface.setContainer("parent1")
    ...
 END MAIN

Multiple container programs can be used to group programs by application modules.

The client displays a system error and the programs stops when:

When the parent container program is stopped, other applications are automatically stopped by the front-end. This will result in a runtime error -6313 on the application server side. To avoid this, you should control that there are no more running child programs before terminating the parent container program. The WCI container program can query for the existence of children with the ui.Interface.getChildCount() and ui.Interface.getChildInstances() methods:
MAIN
  CALL ui.Interface.setName("parent1")
  CALL ui.Interface.setType("container")
  CALL ui.Interface.setText("SoftStore Manager")
  CALL ui.Interface.setSize("600px","1000px")
  CALL ui.Interface.loadStartMenu("mystartmenu")
  MENU "Main"
    COMMAND "Help" CALL help()
    COMMAND "About" CALL aboutbox()
    COMMAND "Exit"
      IF ui.Interface.getChildCount()>0 THEN
         ERROR "You must first exit the child programs."
      ELSE
         EXIT MENU
      END IF
  END MENU
END MAIN