Main BASIS Page
Main Advantage Page
This Issue's Table of Contents
ResCompiler: Another Path To The User Interface Dictionary Previous Article Table of Contents Next Article

By Kurt Williams

ResCompiler is a valuable new feature of Visual PRO/5™ v2.0 that translates ASCII resource definition files (.arc) into the binary resource files (.brc) used by Visual PRO/5 and ResBuilder™. For systems that already have external forms libraries, ResCompiler makes the transformation of older files into the .brc format extremely easy. A developer only needs to write a simple utility that reads the old form definition and writes an .arc file. ResCompiler can then compile the .arc file into a .brc file that can be used in Visual PRO/5™ for presenting the interface, or which can be refined further in ResBuilder.

Even systems without an external forms library can take advantage of the new ResCompiler tool. A developer can write utilities that read data dictionary definitions, code from a legacy application or terminal screen code, and create an .arc file. ResCompiler will then transform the ASCII resource file into the necessary .brc file.

ResCompiler is also found in the Visual PRO/5 v2.0 Program Wizard. Each program the Wizard generates includes an .arc file that is compiled by ResCompiler into a .brc file.

The following is a quick ResCompiler example that uses an .arc file to define a window with two edit boxes and two buttons:

  VERSION "3.0"

  WINDOW 1 "Main Window" 20 20 240 80

  BEGIN

    CURRENTUNITS UNITS_SEMICHARS
    SIZABLE, CLOSEBOX

    EVENTMASK EM_LISTCLICK

    STATICTEXT 103 "First Name:" 20 10 75 10
    EDIT 102 "" 20 20 149 12

    STATICTEXT 101 "Last Name:" 20 40 65 10
    EDIT 104 "" 20 50 149 12

    BUTTON 1 "&OK" 190 20 35 12
    BUTTON 2 "&Cancel" 190 50 35 12

  END

When compiled it results in this window:


 

Previous Article Table of Contents Next Article
 
 
Copyright 1999, BASIS International Ltd. All rights reserved.
Terms of Use
.