Example 1: Implement a global form initialization function

MAIN
  CALL ui.Form.setDefaultInitializer("init")
  OPEN FORM f1 FROM "items"
  DISPLAY FORM f1 -- Form appears in the default SCREEN window 
  OPEN WINDOW w1 WITH FORM "customer"
  OPEN WINDOW w2 WITH FORM "orders"
  DISPLAY FORM f1 -- Form appears in w2 window 
  MENU "Test"
    COMMAND "exit" EXIT MENU
  END MENU
END MAIN

FUNCTION init(f)
  DEFINE f ui.Form
  DEFINE n om.DomNode
  CALL f.loadTopMenu("mymenu")
  LET n = f.getNode()
  DISPLAY "Init: ", n.getAttribute("name")
END FUNCTION