home *** CD-ROM | disk | FTP | other *** search
- **********************************************************************
- * DISCLAIMER OF WARRANTIES: *
- * *
- * The following enclosed code is sample code created by IBM *
- * Corporation. This sample code is not part of any standard IBM *
- * product and is provided to you solely for the purpose of assisting *
- * you in the development of your applications. The code is provided *
- * "AS IS", without warranty of any kind. IBM shall not be liable *
- * for any damages arising out of your use of the sample code, even *
- * if they have been advised of the possibility of such damages. *
- * *
- **********************************************************************
-
- CALCULATOR
-
- DESCRIPTION:
- The calculator application is one of many
- applications that are being used to test the C++
- Visual Builder. It is included in this driver of the
- product as a sample for viewing, execution, and
- building purposes.
-
- The calculator consists of a set of visual and
- non-visual parts. The code for the non-visual
- parts is already written, compiled, and linked
- into a DLL named CPPWV13.DLL.
-
- The visual parts were built and connected into
- an application with the non-visual parts using
- the C++ Visual Builder Tool. The two visual
- parts that comprise the calculator are
- represented by the Visual Builder "class files"
- CLCLTRVW.VBB and KYPDVIEW.VBB.
-
- CONCEPT/FEATURE:
- Refer to AVLTCAL2.SPC for specifications of this
- application.
-
- HOW TO RUN THE SAMPLE:
-
- From within the WorkFrame environment:
- 1. Open the VisualAge for C++ product object.
- 2. Open the Guide to Samples notebook.
- 3. Select "Visual Builder Samples" from the
- Component drop down list.
- 4. Select "Calculator" from the List of Samples.
- 5. Click the "Open Project" button to open the
- project view.
- 6. Click on the RUN button of the project's toolbar.
-
- From the command line:
- 1. Set the current drive as the drive where you
- installed the VisualAge C++ samples.
- 2. Set the directory path for the this sample
- as follows:
- cd ibmcppw\samples\visbuild\calculat
- 3. Set the path environment variable as follows:
- set path=.\cppwv13;%path%
- 4. Type the name of the .EXE file, CLCLTRVW.
-
-
- HOW TO BUILD THE SAMPLE PROJECT YOURSELF:
-
- From within the WorkFrame environment:
- Open the sample project view as described
- above. In the project window you will see
- the icons of the files associated with the sample.
-
- Start the Visual Builder component of
- VisualAge C++ by selecting Visual from
- the Project pulldown. From the main
- Visual Builder Window:
-
- 1. Select from the Menubar the "File->Load"
- option.
- 2. The Load Files dialog will appear with a list
- of "class files" that may be loaded. Select
- from the list the files CLCLTRVW.VBB,
- KYPDVIEW.VBB, and ICALCPRT.VBB and
- press the "OK" button. (The ICALCPRT.VBB
- file contains the already imported Parts
- Interface Defintions for the calculator
- non-visual parts.)
- 3. Select all the parts in the "Visual
- Parts" list and then select
- "Part->Generate->Part source"
- from the Menubar.
- 4. Select only the "CalculatorView"
- part in the "Visual Parts" list and
- then select
- "Part->Generate->main() for part"
- from the Menubar.
- 5. Now invoke a Project Build Action.
-
- To run the sample project, see How to
- run the sample project above.
-
- From the command line:
- Start the Visual Builder component of
- VisualAge C++ by typing:
-
- ivb
-
- From the main Visual Builder Window:
-
- 1. Select from the Menubar the "File->Load"
- option. On the Load Files dialog page,
- set the dialog to the drive and subdirectory
- that contain the CLCLTRVW application.
- 2. The Load Files dialog will appear with a list
- of "class files" that may be loaded. Select
- from the list the files CLCLTRVW.VBB,
- KYPDVIEW.VBB, and ICALCPRT.VBB and
- press the "OK" button. (The ICALCPRT.VBB
- file contains the already imported Parts
- Interface Defintions for the calculator
- non-visual parts.)
- 3. Select all the parts in the "Visual
- Parts" list and then select
- "Part->Generate->Part source"
- from the Menubar.
- 4. Select only the "CalculatorView"
- part in the "Visual Parts" list and
- then select
- "Part->Generate->main() for part"
- from the Menubar.
- 5. From the command line, make this
- sample's directory the current directory
- as described above.
- 6. Set the environment variables as follows:
- set include=.\cppwv13;%include%
- set lib=.\cppwv13;%lib%
- 7. Build the EXE by executing the MAKE as follows:
- nmake clcltrvw.mak
- 8. You may optionally build the DLL, CPPWV13.DLL, which
- contains the code support for the non-visual parts
- used in this sample as follows:
- cd cppwv13
- nmake makefile.mak
-
-
- HOW TO INSPECT THE VISUAL PARTS USING THE VISUAL BUILDER
-
- There are three "class files" that make up the
- application, CLCLTRVW.VBB, KYPDVIEW.VBB, and
- ICALCPRT.VBB.
-
- 1. Start the Visual Builder Tool -- from the
- command line, type:
-
- ivb
-
- or from the project view of the
- sample select "Visual" from the Project
- pulldown.
- 2. When the Visual Builder Window appears,
- select from the Menubar the "File->Load"
- option.
- 3. The Load Files dialog will appear with a list
- of "class files" that may be loaded. Select
- from the list the files CLCLTRVW.VBB,
- KYPDVIEW.VBB, and ICALCPRT.VBB and
- press the "OK" button. (The ICALCPRT.VBB
- file contains the already imported Parts
- Interface Defintions for the calculator
- non-visual parts.)
- 4. You may now select CLCLTRVW.VBB and
- KYPDVIEW.VBB from the "Loaded Part Files"
- list in the Visual Builder Window. This will
- display "calculatorView" and "keypadView"
- in the "Visual Parts" list of this Window.
- 5. You may now select either or both of these
- parts from the "Visual Parts" list and then
- select "Part->Open" from the Menubar to
- open these parts for viewing and/or
- editting.
-
-
- ADDITIONAL INFORMATION:
- For additional information on this and other samples shipped
- with the VisualAge for C++ product, please see the Guide to Samples
- notebook.
-
- To access the notebook from Program Manager, open the
- VisualAge for C++ product object, then open the Guide to Samples
- notebook.