-    HOW TO: ADDITIONAL MENU    

Step by Step guide to using Creating an Additional Menu

This "HOW TO" Guide shows Uniface administrators how to set up the Uniface Additional Menu to work with the command line interface of a CM tool such as CVS, PVCS Version Manager or ClearCase to provide a simple checkin/checkout menu for developers in the IDF.

The process of using CM should be designed for your environment and requirements in mind. The best solution may not be to use an add-in menu. Alternatives include: have the developers use the GUI tool appropriate for the CM system, eg: Version Manager, ClearCase HomeBase or CVS Tortoise.

IDF Additional Menu

This example uses CVS commands, however PVCS Command Line Interface or ClearTool commands can also be used.

The use of a CM tool with Uniface can be simplified by using the "Additional" pulldown menu to activate the CM tool commands.

Once you are familiar with how the command line interface works, executing them from the "Additional" menu is reasonably easy. The Additional menu is a feature of the Uniface Seven and Eight IDF that can be switched on in the preferences. If it is switched on and a Pulldown menu is defined in the USYS library with the name ADDITIONAL the menu appears in the IDF.

Here is the same example code for use with CVS:


; 'additional' CHECKOUT or EDIT pulldown menu

; you should write a similar menu for a COMMIT and/or UPDATE menu

$1=""

$2=$formname

$3=$2[3:4]

if ($3="CONC") ; (schemas)

  $1="schemas.dir/%%U_VLAB.UCSCH%%%.XML"

endif



if ($3="ENTC") ; (tables)

  ; for UD6 1.03 releases prior to UD6 1.03 Beta 3, or using newsubtypesb2 use this code:

  ; $1="%%U_VLAB.UCTABLE%%%.dir/%%U_TLAB.UCTABLE.XML %%U_VLAB.UCTABLE%%%.dir/%%U_GLAB.UCTABLE-%%U_VLAB.UCTABLE-%%U_TLAB.UCTABLE%%%.XML"

  ; for UD6 versions after 1.03 Beta 3 use this code:

  ; for UD6 1.03 Beta 3 and later releases prior, or using newsubtypes enable with UD6 1.02.40 or later use this code:

  $1="%%U_VLAB.UCTABLE%%%.dir/%%U_TLAB.UCTABLE.XML %%U_VLAB.UCTABLE%%%.dir/%%U_GLAB.UCTABLE-%%U_TLAB.UCTABLE%%%.XML"

  ; if CVS is installed locally:

  ;system("cvs co %%$1");

  ; if CVS is not installed on the local machine

  sql "!cvs co %%$1","$IDF"

  $1 = ""

endif

if ($3="ENTC") ; (sub-types)

  $1="%%U_VLAB.UCTABLE%%%.dir/%%U_TLAB.UCGROUP-%%U_GLAB.UCGROUP%%%.XML"

endif

if ($3="RELC") ; (relationships)

  $1="relationships.dir/%%U_GLAB.UCGRP_1-%%U_VLAB.UCGRP_1-%%U_GLAB.UCGRP_M%%%.XML"

endif

if ($3="EXTN") ; (components)

  $1="components.dir/%%ULABEL.UFORM%%%.XML"

endif

if ($3="APPL") ; (applications)

  $1="applications.dir/%%ULABEL.UAPPL%%%.XML"

endif



if ($3="EINT") ; (templates/entity-template)

  $1="templates.dir/entity-interface.dir/%%U_MLAB.UGGIF%%%.XML"



endif

if ($3="INTT") ; (templates/field-interface)

  $1="templates.dir/field-interface.dir/%%U_MLAB.UGFIF%%%.XML"

endif

if ($3="SYNT") ; (templates/field-syntax)

  $1="templates.dir/field-syntax.dir/%%U_MLAB.UGFSYN%%%.XML"

endif

if ($3="LAYT") ; (templates/field-layout)

  $1="templates.dir/field-layout.dir/%%U_MLAB.UGFLAY%%%.XML"

endif

if ($3="FLDT") ; (templates/field-template)

  $1="templates.dir/field.dir/%%TEMPLATENAME.UTPLFLD%%%.XML"

endif



if ($3="MENU") ; (menus)

  $1="menus.dir/%%UMENU.USMENU%%%-%%UVAR.USMENU%%%-%%ULAN.USMENU%%%.XML"

endif

if ($3="GLYP") ; (glyphs)

  $1="glyphs.dir/%%UCSUB.UGLYPH%%%-%%UCLABEL-%%UCVAR.UGLYPH%%%.UGLYPH%%%.XML"

endif

if ($3="DEVC") ; (device translation tables)

  $1="globals.dir/device-tables.dir/%%UVAR%%%-%%ULABEL%%%-%%ULAN%%%.XML"

endif

if ($3="TRAN") ; (keyboard translation tables)

  $1="globals.dir/translation-tables.dir/%%UVAR%%%-%%ULABEL%%%-%%ULAN%%%.XML"

endif

if ($3="TEXT") ; (globals/M.dir)

  $1="globals.dir/messages.dir/%%UVAR%%%-%%ULABEL%%%-%%ULAN%%%.XML"

endif



; This depends on the settings in the UD6 "joins" configuration file

if ($3="LIBR") ; (other/ulibr)

;  $1="libraries.dir/%%ULIBRARY.ULIBR%%%.XML"

  $1="other.dir/ULIBR.XML"

endif



if ($3="CPRC") ; (globals/P.dir)

  $1="globals.dir/global-procs.dir/%%UVAR.USC_PRC%%%-%%ULABEL.USC_PRC%%%-P.XML"

endif

if ($3="CREG") ; (registers)

  $1="registers.dir/%%U_FORMLIB.UGREGS%%%-%%U_NAME.UGREGS%%%.XML"

endif

if ($3="GCNT") ; (globals/I.dir)

  $1="globals.dir/include-procs.dir/%%UVAR.UCNST%%%-%%ULABEL.UCNST%%%-P.XML"

endif

if ($3="INCL") ; (globals/I.dir)

  $1="globals.dir/include-procs.dir/%%UVAR.USC_INC%%%-%%ULABEL.USC_INC%%%-P.XML"

endif

if ($3="MESG") ; (globals/M.dir)

  $1="globals.dir/messages.dir/%%UVAR.USC_MSG%%%-%%ULABEL.USC_MSG%%%-%%ULAN.USC_MSG%%%.XML"

endif

if ($3="HELP") ; (globals/M.dir)

  $1="globals.dir/messages.dir/%%UVAR.USC_HLP%%%-%%ULABEL.USC_HLP%%%-%%ULAN.USC_MSG%%%.XML"

endif

if ($3="PANL") ; (globals/C.dir)

  $1="globals.dir/control-panels.dir/%%UVAR%%%-%%ULABEL%%%-%%ULAN%%%.XML"

endif



; reserved checkouts would use cvs co

; unreserved checkouts would use cvs edit



if ($1 != "")

  ; if CVS is installed locally:

  ;system("cvs co %%$1");

  ; if CVS is not installed on the local machine

  sql "!cvs co %%$1","$IDF"

endif

Further reading

Please also take the time to read the CVS Unreserved Checkouts article and/or the How To: Guides for using Visual SourceSafe, PVCS or ClearCase.

CVS Reserved Checkouts
CVS Unreserved Checkouts
CVS Unreserved Checkouts
ClearCase
PVCS Version Manager
UD6 Overview
A methodology to Uniface source code control

$Revision: 1.20 $ $Date: 2011/02/28 02:56:33 $[go to top]