home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / cset21v3.zip / INF / DDE3TUT.INF (.txt) < prev    next >
OS/2 Help File  |  1993-10-12  |  267KB  |  1,182 lines

  1.  
  2. ΓòÉΓòÉΓòÉ 1. Special Notices ΓòÉΓòÉΓòÉ
  3.  
  4. References in this help to IBM products, programs, or services do not imply 
  5. that IBM intends to make these available in all countries in which IBM 
  6. operates. 
  7.  
  8. Any reference to an IBM licensed program in this help is not intended to state 
  9. or imply that only IBM's licensed program may be used. Any functionally 
  10. equivalent product, program, or service that does not infringe any of IBM's 
  11. intellectual property rights may be used instead of the IBM product, program, 
  12. or service. 
  13.  
  14. Evaluation and verification of operation in conjunction with other products, 
  15. except those expressly designated by IBM, is the user's responsibility. 
  16.  
  17. IBM may have patents or pending patent applications covering subject matter in 
  18. this help. The furnishing of this help does not give you any license to these 
  19. patents. 
  20.  
  21. The following terms, denoted by an asterisk (*) in this help, are trademarks of 
  22. the IBM Corporation in the United States and/or other countries: 
  23.  
  24. IBM 
  25. OS/2 
  26. Operating System/2 
  27. Presentation Manager 
  28. WorkFrame/2. 
  29.  
  30. The following terms used in this publication are trademarks of Microsoft 
  31. Corporation. They are denoted by a double asterisk (**) when they appear in the 
  32. text. 
  33.  
  34. Microsoft 
  35. Windows. 
  36.  
  37. This help contains examples of data and reports used in daily business 
  38. operations. To illustrate them as completely as possible, the examples include 
  39. the names of individuals, companies, brands, and products. All of these names 
  40. are fictitious and any similarity to the names and addresses used by an actual 
  41. business enterprise is entirely coincidental. 
  42.  
  43.  
  44. ΓòÉΓòÉΓòÉ 2. Start Here ΓòÉΓòÉΓòÉ
  45.  
  46. Welcome to the IBM* WorkFrame/2* tutorial. In this tutorial, you will learn 
  47. what the WorkFrame/2 product is and how to use it. 
  48.  
  49. The tutorial is divided into several sections: 
  50.  
  51. About this Tutorial 
  52.           Tells you how to use the tutorial. 
  53.  
  54. Overview 
  55.           Looks at the main, underlying concepts behind the product. 
  56.  
  57. Learning to Use the WorkFrame/2 Product 
  58.           Takes you step-by-step through the development of a sample 
  59.           application. 
  60.  
  61. Select the Forward push button to continue. 
  62.  
  63.  
  64. ΓòÉΓòÉΓòÉ 3. About this Tutorial ΓòÉΓòÉΓòÉ
  65.  
  66. The first section of the tutorial gives an tour of the product. 
  67.  
  68. After the overview, you will learn how to use the WorkFrame/2 product through a 
  69. series of step-by-step lessons that take you through the development of a 
  70. sample project. This part of the tutorial is interactive and you will be using 
  71. the WorkFrame/2 product itself with the sample CLC project as you follow the 
  72. steps. 
  73.  
  74. Though you can use the Table of Contents to go to various parts of the tutorial 
  75. in any order you wish, first-time users should go through it sequentially by 
  76. clicking on the Forward push button when finished with the current panel. 
  77.  
  78. Doing the lessons in the tutorial takes approximately one hour. 
  79.  
  80. The tutorial does not describe every control within the WorkFrame/2 product. 
  81. Once you have finished the tutorial, you can learn more by using the online 
  82. help. 
  83.  
  84.  
  85. ΓòÉΓòÉΓòÉ 4. Overview ΓòÉΓòÉΓòÉ
  86.  
  87. The WorkFrame/2 product offers a unique application development environment 
  88. that you can easily tailor to your own personal needs. It takes full advantage 
  89. of the OS/2* Workplace Shell* interface to create a customizable and 
  90. user-friendly graphical interface that simplifies the process of organizing and 
  91. building software projects. 
  92.  
  93. The Workplace Shell enhances your general productivity through its 
  94. object-action association techniques. With the WorkFrame/2 product, you enhance 
  95. your programming productivity by using similar object-action techniques 
  96. specifically customized for software development. 
  97.  
  98. One of the major tasks any programmer faces is the problem of organizing all 
  99. the code for a software project. Using containers designed specifically for 
  100. code, the WorkFrame/2 product lets you organize your files in a clear and 
  101. meaningful manner. See Projects and Composite Projects for more information. 
  102.  
  103. Once you have organized code, you will not only need to edit, compile, and 
  104. debug it, but you will likely want to use special tools such as icon editors 
  105. and performance profilers too. Ideally, you will want these actions easily 
  106. accessible and easily done. Using the WorkFrame/2's object-action approach, the 
  107. actions you need are available right on the object's pop-up menu. For example, 
  108. if the icon represents a C++ file, you compile it just by selecting the 
  109. compiler you want from its pop-up menu. See Performing Actions for a full 
  110. explanation. In summary, with the WorkFrame/2 product, you can: 
  111.  
  112. o Group source code into containers to give you a visual perspective of how 
  113.   your software projects are organized. 
  114.  
  115. o Organize the actions used to build software applications in a way that is 
  116.   more geared toward the development process than the Workplace Shell 
  117.   association techniques are. 
  118.  
  119. o Set options for actions quickly and easily using graphical user interfaces. 
  120.  
  121. o Integrate the tools you like to use. If you have a favorite editor, your own 
  122.   bitmap viewer, or other tools, you can integrate them along with 
  123.   WorkFrame/2-enabled tools provided by vendors. 
  124.  
  125. o Capture output from actions in a Presentation Manager* (PM) window (see 
  126.   WorkFrame/2 Monitor Window). 
  127.  
  128. o Create make files and manage object code libraries. 
  129.  
  130. And because the WorkFrame/2 product uses many of the OS/2 Desktop features, you 
  131. will find it to be a natural extension of the Workplace Shell that is ideal for 
  132. developing software. 
  133.  
  134.  
  135. ΓòÉΓòÉΓòÉ 4.1. WorkFrame/2 Folder ΓòÉΓòÉΓòÉ
  136.  
  137. Once the WorkFrame/2 has been installed, you will see the WorkFrame/2 icon on 
  138. the Desktop. Clicking on the WorkFrame/2 icon causes the WorkFrame/2 folder to 
  139. open as shown in the following figure. 
  140.  
  141.                              The WorkFrame/2 Folder
  142.  
  143. The icons in this folder represent various components of the WorkFrame/2 
  144. product: 
  145.  
  146. Setup     Is the Setup program. Use it when you want to reinstall the 
  147.           WorkFrame/2 program, add users to a LAN-based WorkFrame/2 
  148.           installation, or migrate files from previous versions to this 
  149.           version. 
  150. Tools     Contains development tools such as utilities for creating make files 
  151.           and managing libraries of object modules. 
  152. Information Contains online information that will help you use the product. 
  153. Samples   Contains the sample code supplied with the WorkFrame/2 product. 
  154. Actions Profiles Contains the profiles defining actions (such as compiling and 
  155.           linking) used in the software development process. 
  156. Action Log Lets you view and save a record of your activities. 
  157.  
  158.  
  159. ΓòÉΓòÉΓòÉ 4.2. Information Folder ΓòÉΓòÉΓòÉ
  160.  
  161. Online information is available in context-sensitive help and online books. 
  162. With context-sensitive help, you press the F1 key or select the Help push 
  163. button to get context-sensitive help for the selected user interface control. 
  164. To access an online book, open the Information folder in the WorkFrame/2 folder 
  165. and select what you want to view. 
  166.  
  167. The Information folder contains tutorials and an online book: 
  168.  
  169. IBM WorkFrame/2 Tutorial 
  170.           Teaches you the WorkFrame/2 basic concepts with a step-by-step 
  171.           example of building a software application. 
  172. IBM Library Manager Tutorial 
  173.           Teaches you how to manage libraries of object modules using the IBM 
  174.           Library Manager utility. 
  175. LIB Utility Reference 
  176.           Describes the command line interface of the IBM Library Manager. 
  177.  
  178.  
  179. ΓòÉΓòÉΓòÉ 4.3. Templates Folder ΓòÉΓòÉΓòÉ
  180.  
  181. Some of the most important components are not in the WorkFrame/2 folder but in 
  182. the OS/2 Templates folder. 
  183.  
  184. When you open up this folder, you see three new templates: 
  185.  
  186. o WorkFrame/2 Project 
  187. o WorkFrame/2 Composite Project 
  188. o Actions Profile 
  189. o Action Log. 
  190.  
  191. From these, you can create projects, composite projects, and profiles in the 
  192. same way you create other OS/2 objects. 
  193.  
  194.  
  195. ΓòÉΓòÉΓòÉ 4.4. Projects ΓòÉΓòÉΓòÉ
  196.  
  197. The development of software applications can usually be divided into different 
  198. components. For example, the components of a software application could consist 
  199. of an executable file, a dynamic link library, and an online book. There might 
  200. also be components that are not part of the final product but a component of 
  201. the development process, such as a class library. 
  202.  
  203. With the WorkFrame/2 product, these different components are referred to as 
  204. projects. A project visually appears as a container holding the source code for 
  205. one of these components (see Figure A Composite Project (CLC) and Two Projects 
  206. (DLL and LIB)). 
  207.  
  208. Projects also contain information used to build the component such as tool 
  209. options and a make file. 
  210.  
  211.  
  212. ΓòÉΓòÉΓòÉ 4.5. Composite Projects ΓòÉΓòÉΓòÉ
  213.  
  214. Composite projects are containers holding projects or other composite projects. 
  215. Use composite projects to organize the projects associated with the software 
  216. application. 
  217.  
  218. In the example mentioned previously, there were projects for the following 
  219. components: 
  220.  
  221. o Executable file 
  222. o Dynamic link library 
  223. o Class library 
  224. o Online book. 
  225. When open, the composite project for the example would appear as below. 
  226.  
  227.             A Composite Project (CLC) and Two Projects (DLL and LIB)
  228.  
  229.  
  230. ΓòÉΓòÉΓòÉ 4.6. Actions Profiles ΓòÉΓòÉΓòÉ
  231.  
  232. The WorkFrame/2 product uses the term action in the same sense that the OS/2 
  233. Workplace Shell does: an action is a command performed on an object. In the 
  234. WorkFrame/2 environment, objects include files, projects, and composite 
  235. projects. You can control which actions appear on the pop-up menus of these 
  236. objects and set options for each action. The set of actions associated with one 
  237. or more projects is known as an actions profile. Each actions profile is 
  238. represented by an icon. You can see the actions in the actions profile by 
  239. opening up its Settings note book. Actions can be configured using an interface 
  240. like that shown here. 
  241.  
  242.                     Changing an Action in an Actions Profile
  243.  
  244. The actions profile defines a number of things, including: 
  245.  
  246. o The class you want the action to belong to. Actions belonging to the same 
  247.   class are grouped together (see Performing an Action). 
  248. o The command used to perform each action in the actions profile. In Figure 
  249.   Changing an Action in an Actions Profile, the action with the name Link is 
  250.   accomplished by starting the program link386.exe. 
  251. o The file mask on which the action can be performed. Most actions are 
  252.   performed on only certain types of files. For example, an action that starts 
  253.   a C compiler would not be useful on executable (.EXE) files. Therefore, to 
  254.   specify that the action only appears on the menus of C source files, you 
  255.   would specify the *.C mask. 
  256. o The name of the dynamic link library (DLL) containing the interface for 
  257.   setting the action's options. 
  258. o Environment variable settings (not shown). For example, you might want to 
  259.   append the PATH environment variable with another path whenever the action 
  260.   profile is used. You can also set your own environment variables. Whatever 
  261.   you specify overrides the current environment settings when the action is 
  262.   started. When the action is completed, the environment reverts to the state 
  263.   it had before the action was started. 
  264.  
  265. Language products, such as compilers, that are enabled for the WorkFrame/2 
  266. product typically supply an actions profile and options DLL that you can add to 
  267. the ones included with the WorkFrame/2 product. 
  268.  
  269. Actions are not limited to those used directly to build the software 
  270. application. Any tools, such as those for editing icons or counting lines of 
  271. source code, can be integrated as an action through an actions profile. 
  272.  
  273.  
  274. ΓòÉΓòÉΓòÉ 4.7. Actions and Projects ΓòÉΓòÉΓòÉ
  275.  
  276. Each project has an associated actions profile. You specify the actions profile 
  277. in one of the settings note book pages for the project. Another page (see 
  278. Figure Actions Page in a Project's Settings Note Book) lets you specify options 
  279. for each action. 
  280.  
  281.                  Actions Page in a Project's Settings Note Book
  282.  
  283. The Options... push button on this page lets you specify the options to be used 
  284. when the selected action is invoked. If the program used to perform the action 
  285. is enabled for the WorkFrame/2 product, you can use a customized graphical user 
  286. interface like the one in Figure Options Interface for the OS/2 Linker to 
  287. select the options. If no customized interface is available, use the one 
  288. provided by the default options DLL included with the WorkFrame/2 product. 
  289.  
  290.                       Options Interface for the OS/2 Linker
  291.  
  292. Because the options are saved with the project, each project has its own, 
  293. unique set of options for each action. 
  294.  
  295.  
  296. ΓòÉΓòÉΓòÉ 4.8. Performing Actions ΓòÉΓòÉΓòÉ
  297.  
  298. Setting up projects and actions is only the organizational aspect of software 
  299. development. Most of the development process is a cycle of creating the source 
  300. code, building it into an executable form, and then modifying it until you get 
  301. the product you want. How do you perform these actions using the WorkFrame/2 
  302. product? 
  303.  
  304. When you want to perform an action on an object in the Workplace Shell (such as 
  305. editing a file), you just point to the icon and select an action from its menu. 
  306. In the same way, with the WorkFrame/2 object-oriented approach, you first 
  307. select the icons you want to perform an action upon, and then you select an 
  308. action from a pop-up menu. Because the options for the action are set in 
  309. advance and stored with the project, you can ignore them unless you want to 
  310. change them. The actions you can perform are not limited to those provided by 
  311. the WorkFrame/2 product. You can define new actions in the actions profile and 
  312. these actions will automatically appear on pop-up menus such as the one shown 
  313. here. 
  314.  
  315.                               Performing an Action
  316.  
  317. You can choose to display the output of an action in a text window, a 
  318. full-screen window, or a WorkFrame/2 monitor window (see below). 
  319.  
  320.                            WorkFrame/2 Monitor Window
  321.  
  322. If an error message in the window contains the name of the file in which the 
  323. error occurred, you can click on the message to start an editing session for 
  324. that file. If the error message also contains the location of the error within 
  325. the file, a WorkFrame/2-enabled editor (such as the OS/2 Enhanced Editor) will 
  326. automatically scroll to the error's location and highlight it. These 
  327. capabilities make the development process smoother and more efficient. 
  328.  
  329.  
  330. ΓòÉΓòÉΓòÉ 5. Learning to Use the WorkFrame/2 Product ΓòÉΓòÉΓòÉ
  331.  
  332. Whether you have used a previous version of the WorkFrame/2 product or not, the 
  333. more familiar you are with the OS/2 Workplace Shell basics, the more productive 
  334. you will be with the WorkFrame/2 Version 2.1 product. View the OS/2 Start Here 
  335. tutorial to learn about the Workplace Shell if you have not already done so. 
  336.  
  337. Because the WorkFrame/2 interface offers a number of features that are ideal 
  338. for mouse users, this tutorial describes the steps as performed with a mouse. 
  339. If you prefer, you can also perform these steps using your keyboard. Shortcut 
  340. keys are indicated on menus, and underlined in windows. For example, an action 
  341. can be selected by typing the shortcut key that is underlined in the menu, 
  342. instead of selecting that action with the mouse. 
  343.  
  344. If you want more information while using the tutorial, consult the 
  345. WorkFrame/2's online help by placing the selection focus on the control and 
  346. pressing F1 or the Help push button. 
  347.  
  348.  
  349. ΓòÉΓòÉΓòÉ 5.1. Lesson 1: A Sample Application ΓòÉΓòÉΓòÉ
  350.  
  351. The sample application you will build is called the Command Line Calculator. 
  352.  
  353. To build it, you need the IBM C/C++ Tools compiler and the make utility 
  354. (NMAKE.EXE) that comes with IBM Developer's Toolkit product. If the Developer's 
  355. Toolkit was installed before the WorkFrame/2 product was installed, the action 
  356. starting NMAKE.EXE already exists in the default actions profile. If the 
  357. Developer's Toolkit was installed after the WorkFrame/2 product was installed, 
  358. you need to: 
  359.  
  360.  1. Open the IBM WorkFrame/2 V2.1 folder. 
  361.  2. Open the Actions Profiles folder. 
  362.  3. Open the Default Actions Profile and the IBM Toolkit Profile. 
  363.  4. In the IBM Toolkit Profile, select the action with class MAKE and name 
  364.     NMake. Hold down mouse button 2, press the Ctrl key, and drag the action to 
  365.     the Actions list in the Default Actions Profile. A copy of the action will 
  366.     appear in the default actions profile. 
  367.  5. Close both actions profiles and the Actions Profiles folder. 
  368.  
  369. Note:  Be sure to check the READ.ME file for any information about the tutorial 
  370.        before you do it. 
  371.  
  372.  
  373. ΓòÉΓòÉΓòÉ 5.2. Lesson 2: Organizing the Project ΓòÉΓòÉΓòÉ
  374.  
  375. The Command Line Calculator has been divided into four components: 
  376.  
  377. o A class library file containing class definitions. 
  378.  
  379. o The executable file which starts and ends the program. 
  380.  
  381. o The dynamic link library containing the calculator's functions. 
  382.  
  383. o Online documentation that can be viewed using the OS/2* view command. 
  384.  
  385. Visually, this application will appear as a composite project containing four 
  386. project icons. 
  387.  
  388. Note:  Because of the simplicity of the sample application, the number of 
  389.        source files per project is small. In a practical application, the 
  390.        number of source files would be greater and the benefits of organizing 
  391.        them through projects would be more evident. 
  392.  
  393.  
  394. ΓòÉΓòÉΓòÉ 5.3. Lesson 3: Creating a Composite Project ΓòÉΓòÉΓòÉ
  395.  
  396. You create WorkFrame/2 objects in the same way as you would create other OS/2 
  397. Workplace Shell objects. 
  398.  
  399.  1. Open the OS/2 Templates folder. 
  400.  
  401.  2. Find the template for the WorkFrame/2 Composite Project and drag it to the 
  402.     Desktop. When you drop the the template on the Desktop, it changes into an 
  403.     actual composite project. 
  404.  
  405.  3. Open the Settings note book for the composite project now on the Desktop. 
  406.     (Like other OS/2 objects, you can open the Settings note book by clicking 
  407.     once with mouse button 2 to display the pop-up menu and then selecting 
  408.     OpenSettings.) 
  409.  
  410.  4. Go to the General page and change the Title to "Command Line Calculator". 
  411.  
  412.  5. Go to the Background page. 
  413.  
  414.  6. Select Color as the Background and then select the Change color... push 
  415.     button to open the color palette. 
  416.  
  417.  7. Select a new color from the color palette and then close the palette. 
  418.  
  419.  8. Close the Settings note book. 
  420.  
  421.  9. Open the composite project by double-clicking on it with mouse button 1. 
  422.  
  423. You should now see a folder on your screen with the title "Command Line 
  424. Calculator". It will have the background color you selected. Colors and fonts 
  425. of WorkFrame/2 projects can be changed using the standard techniques that come 
  426. with the OS/2 WorkPlace Shell. 
  427.  
  428.  
  429. ΓòÉΓòÉΓòÉ 5.4. Lesson 4: Creating a Project ΓòÉΓòÉΓòÉ
  430.  
  431. Now that you have created the composite project, you need to create the 
  432. projects that comprise the Command Line Calculator. 
  433.  
  434. In this lesson, you will create the project for the dynamic link library of the 
  435. Command Line Calculator. This DLL contains the functions available to the 
  436. calculator. 
  437.  
  438.  1. Find the WorkFrame/2 Project template (also in the Templates folder) and 
  439.     drag it into the Command Line Calculator folder. When it reaches the latter 
  440.     folder, the template changes into an actual project. 
  441.  
  442.  2. Close the Templates folder. 
  443.  
  444.  3. Double-click on the Project icon you just created to open its Settings note 
  445.     book. 
  446.  
  447.  4. Go to the General page of the project's Settings note book and change the 
  448.     Title to "Functions". 
  449.  
  450.  
  451. ΓòÉΓòÉΓòÉ 5.5. Lesson 5: Adding Code ΓòÉΓòÉΓòÉ
  452.  
  453. In these steps, you will specify where the source code resides for the 
  454. Functions project. The code has already been supplied with the WorkFrame/2 
  455. product so you do not have to write it. 
  456.  
  457.  1. Go to the Source page (of the Functions - Settings note book). 
  458.  
  459.  2. In the Source directories list box and type 
  460.  
  461.         drive:\wfv2_directory\PRJ\CLC\DLL
  462.         drive:\wfv2_directory\PRJ\CLC\HEADERS
  463.  
  464.     Note:  Replace drive:\wfv2_directory with the drive and directory where the 
  465.            WorkFrame/2 product is installed on your computer. 
  466.  
  467.     Because the sample code was installed with the WorkFrame/2 product, these 
  468.     directories already exist. If they did not already exist, the WorkFrame/2 
  469.     product could create them for you. 
  470.  
  471.  3. In the File masks list, enter the following extensions one per line: 
  472.  
  473.         *.CPP
  474.         *.H
  475.         *.DEF
  476.         *.MAK
  477.         *.DLL
  478.  
  479.     By specifying file masks, you can control what types of files are displayed 
  480.     within the project. 
  481.  
  482.  4. Open the pop-up menu of the Functions project icon and select 
  483.     OpenIcon view. 
  484.  
  485.     You will see the files contained in the directories you specified. 
  486.  
  487.  
  488. ΓòÉΓòÉΓòÉ 5.6. Lesson 6: Completing the Project Settings ΓòÉΓòÉΓòÉ
  489.  
  490.  1. Turn to the Target note book page. Ensure that 
  491.     drive:\wfv2_directory\PRJ\CLC\DLL is selected as the Working directory. 
  492.     (Remember, drive:\wfv2_directory is the directory where the WorkFrame/2 
  493.     product is installed on your computer.) 
  494.  
  495.     When you drag a file to a base project, the file is placed in this 
  496.     directory. New files created by actions are also placed in the target 
  497.     directory. 
  498.  
  499.  2. In the Make file name field, type CALCFUNC.MAK. You may have to delete or 
  500.     type over the default entry. 
  501.  
  502.     CALCFUNC.MAK is the name of the make file to be used to create the target 
  503.     file. You will create this file later in this tutorial. 
  504.  
  505.  3. Go to the second Target page. In the Target program file name field, type 
  506.     CALCFUNC.DLL. 
  507.  
  508.     The target file name defines the object to be built by the project (such as 
  509.     an executable module or DLL.) 
  510.  
  511.  4. Go to the Profile page. 
  512.  
  513.  5. Open the Actions Profiles folder (located in the IBM WorkFrame/2 folder) 
  514.     and drag the CLC Actions Profile to the Actions Profile field in the top 
  515.     left part of the Profile page. 
  516.  
  517.     The field now indicates the path to the command line calculator's actions 
  518.     profile and its Title is now shown as CLC Actions Profile. 
  519.  
  520. Note:  If you move the Actions Profile folder after you have specified a 
  521.        project's actions profile, you may get messages saying the actions 
  522.        profile cannot be found. Should this happen, open the actions profile 
  523.        and close it again. 
  524.  
  525. You have now specfied what files make up the project. When you selected the 
  526. profile, you selected what set of actions can be used to build the project's 
  527. target program. 
  528.  
  529.  
  530. ΓòÉΓòÉΓòÉ 5.7. Lesson 7A: About Actions Profiles ΓòÉΓòÉΓòÉ
  531.  
  532. The Overview at the beginning of the tutorial gave a brief introduction to 
  533. actions and actions profiles. In the following sections, you will examine, in 
  534. more detail, how the action that starts the compiler has been set up. Unlike 
  535. other parts of the tutorial, the following steps do not require you to add or 
  536. change anything; they simply show you how actions are set up. 
  537.  
  538.  
  539. ΓòÉΓòÉΓòÉ 5.8. Lesson 7B: How Actions Appear In Menus ΓòÉΓòÉΓòÉ
  540.  
  541. In the WorkFrame/2 environment, you can define a wide variety of attributes for 
  542. an action. The most important ones are described here. (See the online help for 
  543. information about those attributes which are not described here.) 
  544.  
  545. Some attributes control how actions appear on menus. 
  546.  
  547.       ΓòöΓòÉΓòÉΓòÉΓòÉΓòÉΓòÉΓòÉΓòÉΓòÉΓòÉΓòÉΓòÉΓòÉΓòÉΓòÉΓòÉΓòÉΓòÉΓòÉΓòÉΓòÉΓòÉΓòÉΓòÉΓòÉΓòÉΓòÉΓòÉΓòÉΓòÉΓòÉΓòÉΓòÉΓòÉΓòÉΓòÉΓòÉΓòÉΓòÉΓòÉΓòÉΓòÉΓòÉΓòÉΓòÉΓòÉΓòÉΓòÉΓòÉΓòÉΓòù
  548.       Γòæ Project                                          Γòæ
  549.       ΓòáΓòÉΓòÉΓòÉΓòÉΓòÉΓòÉΓòÉΓòÉΓòÉΓòÉΓòÉΓòÉΓòÉΓòÉΓòÉΓòÉΓòÉΓòÉΓòÉΓòÉΓòÉΓòÉΓòÉΓòÉΓòÉΓòÉΓòÉΓòÉΓòÉΓòÉΓòÉΓòÉΓòÉΓòÉΓòÉΓòÉΓòÉΓòÉΓòÉΓòÉΓòÉΓòÉΓòÉΓòÉΓòÉΓòÉΓòÉΓòÉΓòÉΓòÉΓòú
  550.       Γòæ       ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ Classes of actions       Γòæ
  551.       Γòæ  Γö£ΓöÇΓöÇΓöÇΓöÇΓöéΓöÇΓöÇΓöÇΓöÇΓöñ                                     Γòæ
  552.       Γòæ  Γöé...     Γöé                                     Γòæ
  553.       Γòæ  Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ                            Γòæ
  554.       Γòæ  ΓöéCOMPILE Γöé DefaultΓöé                            Γòæ
  555.       Γòæ  ΓöéEDIT    Γöé IBM C++Γöé                            Γòæ
  556.       Γòæ ΓöîΓö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ ABC C++Γöé                            Γòæ
  557.       Γòæ ΓöéΓöé...      Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÿ                            Γòæ
  558.       Γòæ ΓöéΓö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ                                    Γòæ
  559.       Γòæ Γöé   Γöé         Γöé                                  Γòæ
  560.       Γòæ ΓööΓöÇΓöÇΓöÇΓöÿ         ΓööΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ Names of actions       Γòæ
  561.       Γòæ FILE.CPP                                         Γòæ
  562.       ΓòÜΓòÉΓòÉΓòÉΓòÉΓòÉΓòÉΓòÉΓòÉΓòÉΓòÉΓòÉΓòÉΓòÉΓòÉΓòÉΓòÉΓòÉΓòÉΓòÉΓòÉΓòÉΓòÉΓòÉΓòÉΓòÉΓòÉΓòÉΓòÉΓòÉΓòÉΓòÉΓòÉΓòÉΓòÉΓòÉΓòÉΓòÉΓòÉΓòÉΓòÉΓòÉΓòÉΓòÉΓòÉΓòÉΓòÉΓòÉΓòÉΓòÉΓòÉΓò¥
  563.  
  564. The above diagram shows the pop-up menu of a file. The pop-up menus of projects 
  565. and composite projects are similar except that the classes are pointed to by an 
  566. Actions  item. 
  567.  
  568. How does an action (like one for invoking a C compiler) appear on the menu of a 
  569. file? First, the action must be part of the actions profile associated with the 
  570. project. Each action within the profile has a list of file masks and file types 
  571. that indicate what files are valid source for the action. For example, an 
  572. action that compiles C files (*.C) into object (*.OBJ) files should appear on 
  573. the pop-up menu for C files. The same action would be inappropriate for object 
  574. files. 
  575.  
  576. Then the actions are grouped into classes. (An action's class is defined when 
  577. you are adding the action to the actions profile.) For example, if you have 
  578. actions for compiling with different compilers, you could group them under the 
  579. class COMPILE. When the menu is first opened, only the classes of actions are 
  580. shown. To display the actions belonging to the class, click on the arrow ('') 
  581. button to the right of the class. 
  582.  
  583. Actions that act on the project rather than specific files can appear on the 
  584. project's pop-up menu. Again, you can control this feature through the actions 
  585. profile. 
  586.  
  587.  
  588. ΓòÉΓòÉΓòÉ 5.9. Lesson 7C: Setting Up an Action ΓòÉΓòÉΓòÉ
  589.  
  590.  1. Open the CLC Actions Profile. The Actions page shows you a list of the 
  591.     actions defined in the profile as well as controls for adding, changing and 
  592.     deleting actions. The order of the actions in this list controls the order 
  593.     the actions appear in pop-up menus. If you wanted an action to be at the 
  594.     top of its menu, you would move it above the other actions in its class. 
  595.  
  596.  2. Select the action which has its class as COMPILE and its name as CLC C++. 
  597.  
  598.  3. Select the Change... push button to open up the note book containing the 
  599.     actions's settings. This note book is used when you are adding an action as 
  600.     well as changing one. 
  601.  
  602.     The General page of the Change note book contains controls that let you 
  603.     specify the class, name, and what menus the action appears on. It also 
  604.     specifies the command that invokes the action's executable file and how it 
  605.     will be run. For the COMPILE::CLC C++ action, its executable file is 
  606.     ICC.EXE and this program will be run in a Monitor window. 
  607.  
  608.  
  609. ΓòÉΓòÉΓòÉ 5.10. Lesson 7D: Setting Up an Action (Continued) ΓòÉΓòÉΓòÉ
  610.  
  611.  1. Go to the Options page. 
  612.  
  613.     This page specifies the dynamic link library (DLL) containing the 
  614.     interfaces to the action. For WorkFrame/2-enabled actions, the vendor of 
  615.     the action will have supplied a customized DLL. Since the DLL may contain 
  616.     interfaces for a variety of actions, the class of entry point is also 
  617.     specified on this page. (By default, the WorkFrame/2 product tries to match 
  618.     the class of entry point with the class of action you specified.) Typically 
  619.     vendors will have already provided an actions profile specifiying these 
  620.     parameters or will have provided specific instructions to help you set up 
  621.     the actions they provide. The COMPILE::CLC C++ action uses DDE4ICC2.DLL 
  622.     file supplied with the IBM C/C++ Tools product and the selected entry point 
  623.     class is COMPILE. 
  624.  
  625.     The WorkFrame/2* product provides several classes (including a DEFAULT 
  626.     class) in its default DLL (DDE3DEF2.DLL). You can use this DLL when you 
  627.     want to add actions that have not been specifically enabled for the 
  628.     WorkFrame/2 product. 
  629.  
  630. Before you run an action, you may need to set or change environment variables. 
  631. The Environments page of the actions profile lets you specify the environment 
  632. required when an action in the actions profile is invoked. The Types page in 
  633. the note book lets you specify the types of files the action can act upon and 
  634. the types of files that can be produced. The Help page lets you provide help 
  635. for the action. 
  636.  
  637. When you have finished examining the Change window, select the Cancel push 
  638. button to close it. When you have finished browsing the CLC Actions Profile, 
  639. close it and go to the next panel. 
  640.  
  641.  
  642. ΓòÉΓòÉΓòÉ 5.11. Lesson 8A: Setting the Compiler Options ΓòÉΓòÉΓòÉ
  643.  
  644. Often, a group of projects will use a common set of actions. However, the 
  645. options for those actions are usually specific to each project. Therefore, you 
  646. set options from within each project's Settings note book. 
  647.  
  648.  1. Go to the first Actions page of the Functions - Settings note book. 
  649.  
  650.     This page lists the actions that operate on files. Actions are referred to 
  651.     by first indicating the action's class and then the name of the action 
  652.     itself. The two items are separted by a pair of colons. For example, 
  653.     COMPILE::IBM C++ is an action with the name IBM C++ and its class is 
  654.     COMPILE. 
  655.  
  656.  2. Select the COMPILE::CLC C++ action in the Actions list box. Then select the 
  657.     Options push button to open the IBM C/C++ Tools Compiler Options note book. 
  658.  
  659.     Each note book tab corresponds to a category of processing options. 
  660.  
  661.  3. Go to the Other page and deselect Yes as the option for Preload compiler 
  662.     components. 
  663.  
  664.     Ensure that Perform compile only, no link is selected. 
  665.  
  666.     This field indicates that you want the linker invoked as a separate step of 
  667.     the build process. 
  668.  
  669.  4. Go to the Object page and select the DLL choice as the Build type. 
  670.  
  671.  5. Select the OK push button to close the IBM C/C++ Tools Compiler Options 
  672.     note book. 
  673.  
  674.  
  675. ΓòÉΓòÉΓòÉ 5.12. Lesson 8B: Setting the Linker Options ΓòÉΓòÉΓòÉ
  676.  
  677.  1. Select the LINK::CLC Link action in the Actions list box. Then select the 
  678.     Options push button to open the IBM C/C++ Tools Linker Options note book. 
  679.  
  680.     A note book appears with each tab representing a category of linker 
  681.     options. 
  682.  
  683.  2. Go to the Generation page. 
  684.  
  685.     This page allows you to set options that control how the executable file is 
  686.     to be generated. 
  687.  
  688.  3. At the bottom of the Generation window are the Application Type options. 
  689.     Ensure that the Window radio button is selected. 
  690.  
  691.     This instructs the linker to generate a text-windowed application. By 
  692.     default the linker attempts to make a non-Presentation Manager (PM) 
  693.     application text-windowed. By explicitly selecting this option you 
  694.     eliminate a warning message at link time. 
  695.  
  696.  
  697. ΓòÉΓòÉΓòÉ 5.13. Lesson 8C: Setting Linker Options (Continued) ΓòÉΓòÉΓòÉ
  698.  
  699.  1. Go to the File names page. 
  700.  
  701.  2. Enter the following: 
  702.  
  703.    Libraries to use 
  704.              ..\LIB\CALC_CLS.LIB 
  705.  
  706.    Definition (.DEF) file name 
  707.              CALCFUNC.DEF 
  708.  
  709.     The %o text in the Generated target file name field is a substitution 
  710.     variable. Substitution variables are used by the WorkFrame/2 product to 
  711.     represent objects like actual file names, projects, or options. %o 
  712.     represents the target program of the project (specified on the Target page 
  713.     of the Functions settings note book). Details about other substitution 
  714.     variables can be found in the online help. 
  715.  
  716.  3. Select the OK push button to close the IBM C/C++ Tools Linker Options note 
  717.     book. 
  718.  
  719.  4. Close the project's Settings note book. 
  720.  
  721.  
  722. ΓòÉΓòÉΓòÉ 5.14. Lesson 9: Copying the Rest of the Projects ΓòÉΓòÉΓòÉ
  723.  
  724. The other sample projects have already been created for you. In this section 
  725. you will copy them into the Command Line Calculator composite project. 
  726.  
  727.  1. Open the Samples folder (located in the IBM WorkFrame/2 folder) and then 
  728.     open the composite project entitled CLC. As you can see, this composite 
  729.     project contains four projects: EXE, LIB, INFO, and DLL. (The DLL project 
  730.     is a duplicate of the Functions project you just created.) 
  731.  
  732.  2. Select Copy... from the pop-up menu of the EXE project. 
  733.  
  734.  3. Once the Copy window opens, specify the New name field to "Executable". 
  735.  
  736.  4. Select Command Line Calculator as the target folder and then select the 
  737.     Copy push button to complete the copying. 
  738.  
  739.  5. Do the above steps once again to copy the projects for the calculator's 
  740.     class library (LIB) and online reference (INFO). Specify the new names as 
  741.     "Class Library" and "Reference". 
  742.  
  743.  6. Close the CLC and Samples folders. 
  744.  
  745. You have now created and copied all the projects needed for the command line 
  746. calculator. In this tutorial, none of the projects in the Command Line 
  747. Calculator is itself a composite project. However, composite projects can also 
  748. contain other composite projects. 
  749.  
  750.  
  751. ΓòÉΓòÉΓòÉ 5.15. Lesson 10: Prioritizing the Projects ΓòÉΓòÉΓòÉ
  752.  
  753. The composite project contains settings controlling how the order that the 
  754. projects within it are made. 
  755.  
  756. If the projects are independent of each other, then the order they are made in 
  757. does not matter. However, if one project is depends on another, then the order 
  758. does matter. 
  759.  
  760. In the Command Line Calculator, both the Executable and Functions projects use 
  761. files created by the Class Library project. Therefore, the class library needs 
  762. to be made before them. After it is made, the other projects can be made in any 
  763. order. 
  764.  
  765.  1. Open the Settings note book for the Command Line Calculator composite 
  766.     project. 
  767.  
  768.  2. Go to the Sequence page. 
  769.  
  770.  3. All the projects in Command Line Calculator composite project appear in the 
  771.     Available projects list box. Select the Class Library project and then 
  772.     select the Add >> push button to move it to the Project sequence list. 
  773.  
  774.  4. Select the rest of the projects in the Projects list box. You can do this 
  775.     by placing the mouse pointer on the first item, holding mouse button 1 
  776.     down, dragging the pointer across the other items, and releasing mouse 
  777.     button 1 once the pointer is over the last item. 
  778.  
  779.  5. Drag the selected projects from the Available projects list box to the 
  780.     Project sequence list box. End the drag at a point below the Class Library 
  781.     item in the list box. 
  782.  
  783.     Note:  If you decide later to reorder the projects in the Project sequence 
  784.            list box, you can just select projects and drag them to a new place 
  785.            in the sequence. 
  786.  
  787.  
  788. ΓòÉΓòÉΓòÉ 5.16. Lesson 11: Specifying the Target Project ΓòÉΓòÉΓòÉ
  789.  
  790.  1. Go to the Target page. On this page you can select one of the projects to 
  791.     be the target project of the composite project. A target project has the 
  792.     following characteristics: 
  793.  
  794.    o When files are copied or moved into the composite project, the file is 
  795.      physically placed in the working directory specified in the target 
  796.      project's settings. 
  797.  
  798.    o When OpenTarget program is selected from the composite project's pop-up 
  799.      menu, the WorkFrame/2 product tries to run the target program of the 
  800.      target project. (The target program is the file built by the project.) 
  801.  
  802.  2. Select Executable as the target project. This project is the executable 
  803.     file used to start the command line calculator. The Functions project is 
  804.     the dynamic link library defining the calculator's functions. 
  805.  
  806.  3. Close the Command Line Calculator's Settings note book. 
  807.  
  808.  
  809. ΓòÉΓòÉΓòÉ 5.17. Lesson 12: Creating a Make File ΓòÉΓòÉΓòÉ
  810.  
  811. Creating make files can be one of the more time-consuming tasks of product 
  812. development. Fortunately, the WorkFrame/2 product comes with a utility for 
  813. automating the creation of make files that can be used with NMAKE program that 
  814. comes with the IBM Developer's Toolkit product. In this lesson, you will use 
  815. the MakeMake utility to create a make file for the Functions project. 
  816.  
  817.  1. Open the WorkFrame/2 Tools folder and locate the MakeMake icon. 
  818.  
  819.  2. Drag the Functions project icon to the MakeMake icon to open the MakeMake 
  820.     utility. Once the MakeMake's product information window appears, select its 
  821.     OK push button to continue. 
  822.  
  823.  3. Select the COMPILE::CLC C++ and LINK::CLC Link actions. 
  824.  
  825.     As you select actions, source files for those actions automatically appear 
  826.     in the Files list box. In this case, only one source file, CALCFUNC.CPP, is 
  827.     listed. Ensure that it is shown as selected. 
  828.  
  829.  4. Select the Start push button to create the make file. 
  830.  
  831.  5. When the make file has been created, the MakeMake Results window appears. 
  832.     This window shows you the make file (CALCFUNC.MAK) and its dependency file 
  833.     (CALCFUNC.DEP) if one was created. 
  834.  
  835.     You could modify these files using the MakeMake Results window or any text 
  836.     editor. In this case, you do not have to change it, so just close the 
  837.     MakeMake Results window. 
  838.  
  839.  6. Select the Save make file item from the File pull-down of the MakeMake 
  840.     window. 
  841.  
  842.  7. Close the MakeMake utility. 
  843.  
  844.     The name of the make file, CALCFUNC.MAK, is the one you specified in the 
  845.     project's settings. 
  846.  
  847.  
  848. ΓòÉΓòÉΓòÉ 5.18. Lesson 13: Building the Project ΓòÉΓòÉΓòÉ
  849.  
  850. Now that you have set up the projects, specified actions and their options, and 
  851. built a make file, you are now ready to build the first version of the project. 
  852.  
  853. To build the project, you need to run the MAKE::NMake action on the make file 
  854. of each project starting with the Class Library. You already specified the 
  855. order in which the projects should be built on the Sequence page of the 
  856. composite project. And because the MAKE::NMake action is included in the 
  857. default actions profile, it appears on the pop-up menu of the Command Line 
  858. Calculator composite project. Selecting the MAKE::NMake action from the Command 
  859. Line Calculator's pop-up menu, starts the MAKE::NMake action for each project. 
  860.  
  861.  1. Open the system menu for Command Line Calculator composite project. 
  862.  
  863.  2. Find the Actions entry in the menu and select ActionsMAKENMake. 
  864.  
  865.  3. When the Action window opens, deselect Multiple, concurrent monitors to 
  866.     make the processing sequential. (You can set the default monitor behaviour 
  867.     on the Monitor page of each project.) Then select Start to start the make 
  868.     actions. 
  869.  
  870.  4. When the Monitor window appears, select Automatic scrolling. 
  871.  
  872.     In the Monitor window, you will see the MAKE::NMake action started for each 
  873.     project. Each invocation is followed by output from the tools and then by a 
  874.     line showing two return codes. The rc=0 return code indicates that none of 
  875.     the tools started by the NMAKE utility returned any errors. 
  876.  
  877.  5. When the make actions are finished, close the Monitor and 
  878.     Command Line Calculator - MAKE::NMake windows. 
  879.  
  880.  
  881. ΓòÉΓòÉΓòÉ 5.19. Lesson 14: Running the Command Line Calculator ΓòÉΓòÉΓòÉ
  882.  
  883. Now that all the files for the command line calculator have been built, you are 
  884. almost ready to run the program. Because you cannot reset the LIBPATH 
  885. environment variable (which the operating system uses to locate dynamic link 
  886. libraries) without rebooting the computer, you need to copy the Functions DLL 
  887. to a directory already pointed to by the LIBPATH variable before doing the 
  888. following steps. Therefore, copy the CALCFUNC.DLL file from the 
  889. drive:\wfv2_directory\PRJ\CLC\DLL subdirectory to the drive:\wfv2_directory\DLL 
  890. subdirectory. (drive:\wfv2_directory refers to the directory where the 
  891. WorkFrame/2 product is installed on your computer.) 
  892.  
  893.  1. Go to Command Line Calculator's system menu. Select OpenTarget program to 
  894.     run the calculator. 
  895.  
  896.     Because Window was specified as the Application Type in the linker options, 
  897.     a text window opens in which the calculator starts. The text window should 
  898.     look something like this: 
  899.  
  900.          ΓòöΓòÉΓòÉΓòÉΓòÉΓòÉΓòÉΓòÉΓòÉΓòÉΓòÉΓòÉΓòÉΓòÉΓòÉΓòÉΓòÉΓòÉΓòÉΓòÉΓòÉΓòÉΓòÉΓòÉΓòÉΓòÉΓòÉΓòÉΓòÉΓòÉΓòÉΓòÉΓòÉΓòÉΓòÉΓòÉΓòÉΓòÉΓòÉΓòÉΓòÉΓòÉΓòÉΓòÉΓòÉΓòÉΓòÉΓòÉΓòÉΓòÉΓòÉΓòÉΓòÉΓòÉΓòÉΓòÉΓòÉΓòÉΓòÉΓòÉΓòÉΓòÉΓòÉΓòÉΓòÉΓòÉΓòÉΓòÉΓòù
  901.          Γòæ                                                                   Γòæ
  902.          Γòæ [E:\IBMWF\PRJ\CLC]calc                                            Γòæ
  903.          Γòæ                                                                   Γòæ
  904.          Γòæ The Command Line Calculator is starting...                        Γòæ
  905.          Γòæ                                                                   Γòæ
  906.          Γòæ Command Summary:                                                  Γòæ
  907.          Γòæ add     Adds x to result.  Syntax: "add x".                       Γòæ
  908.          Γòæ div     Divides result by x.  Syntax: "div x".                    Γòæ
  909.          Γòæ end     Ends CLC.  Syntax: "end".                                 Γòæ
  910.          Γòæ help    Lists this help.  Syntax: "help".                         Γòæ
  911.          Γòæ inv     Inverts result.  Syntax: "inv".                           Γòæ
  912.          Γòæ mult    Multiplies result by x.  Syntax: "mult x".                Γòæ
  913.          Γòæ rcl     Copies value of register x into result.  Syntax: "rcl x". Γòæ
  914.          Γòæ regs    Show contents of registers.  Syntax: "regs".              Γòæ
  915.          Γòæ sqrt    Sets result to its square root.  Syntax "sqrt".           Γòæ
  916.          Γòæ stats   Finds average and standard deviation of a set of values.  Γòæ
  917.          Γòæ         Syntax: "stats".                                          Γòæ
  918.          Γòæ sto     Copies result into register x.  Syntax: "sto x".          Γòæ
  919.          Γòæ sub     Subtracts x from result.  Syntax: "sub x".                Γòæ
  920.          Γòæ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^              Γòæ
  921.          Γòæ                                                                   Γòæ
  922.          Γòæ Ready for calculations.                                           Γòæ
  923.          Γòæ [         0] :>_                                                  Γòæ
  924.          Γòæ                                                                   Γòæ
  925.          ΓòÜΓòÉΓòÉΓòÉΓòÉΓòÉΓòÉΓòÉΓòÉΓòÉΓòÉΓòÉΓòÉΓòÉΓòÉΓòÉΓòÉΓòÉΓòÉΓòÉΓòÉΓòÉΓòÉΓòÉΓòÉΓòÉΓòÉΓòÉΓòÉΓòÉΓòÉΓòÉΓòÉΓòÉΓòÉΓòÉΓòÉΓòÉΓòÉΓòÉΓòÉΓòÉΓòÉΓòÉΓòÉΓòÉΓòÉΓòÉΓòÉΓòÉΓòÉΓòÉΓòÉΓòÉΓòÉΓòÉΓòÉΓòÉΓòÉΓòÉΓòÉΓòÉΓòÉΓòÉΓòÉΓòÉΓòÉΓòÉΓò¥
  926.  
  927.  2. After the initial euphoria of getting the calculator to build and run, you 
  928.     now notice there is no function for squaring a result. In the next lessons, 
  929.     you will add this function. 
  930.  
  931.  3. Enter 
  932.  
  933.            end
  934.  
  935.     at the Command Line Calculator's prompt to close the calculator. Both the 
  936.     calculator and its text window will close. 
  937.  
  938.  
  939. ΓòÉΓòÉΓòÉ 5.20. Lesson 15: Adding a Function ΓòÉΓòÉΓòÉ
  940.  
  941. In this lesson, you will add a new function to the Command Line Calculator. The 
  942. new function squares the contents within the display area. 
  943.  
  944. The functions are defined in the CALCFUNC.CPP file in the calculator's dynamic 
  945. link library. 
  946.  
  947.  1. Locate the file CALCFUNC.CPP in the Functions project. Open its pop-up menu 
  948.     and select the EDITEPM action of the CALCFUNC.CPP file. 
  949.  
  950.  2. Go to line 45 and remove the "// " in front of the line 
  951.  
  952.         // int Square(void)
  953.  
  954.     to change it to 
  955.  
  956.         int Square(void)
  957.  
  958.     You may have noticed that this prototype does not end with a semicolon. The 
  959.     error caused by this problem will be used to demonstrate how the 
  960.     WorkFrame/2 product integrates with the Enhanced Editor. 
  961.  
  962.  3. Go to line 66 and remove the "// " token at the front of the line 
  963.  
  964.         //               CLC.AddFunction( "square", ...
  965.  
  966.  4. Go line 176 and change the "/*" token to the "//" token. 
  967.  
  968.  5. Go line 183 and change the "*/" token to the "//" token. 
  969.  
  970.     Again, you may have noticed an error that will be corrected later in this 
  971.     tutorial. 
  972.  
  973.  6. Select the Save and quit item from the editor's File pull-down menu to save 
  974.     the file and close the editor. 
  975.  
  976.  
  977. ΓòÉΓòÉΓòÉ 5.21. Lesson 16: Compiling A File ΓòÉΓòÉΓòÉ
  978.  
  979. The MAKE::NMake action was started from the project's pop-up menu. To 
  980. demonstrate how an action is invoked against a specific file, the following 
  981. steps show you how to compile CALCFUNC.CPP. 
  982.  
  983.  1. Select COMPILECLC C++ from the pop-up menu of the icon representing the 
  984.     CALCFUNC.CPP file. 
  985.  
  986.  2. After the monitor window opens, you will see the output from the compiler 
  987.     in it. Since there are errors, you will have to correct them. 
  988.  
  989.     Place the mouse pointer on the text of the first error message containing 
  990.     the file name and location of the error. (In this case, the message is 
  991.  
  992.           drive:\wfv2_directory\PRJ\CLC\DLL\CALCFUNC.CPP(46:1) : error EDC3263: Syntax error - expected ";" or "{" and found "int".
  993.  
  994.     The syntax of the message indicates the error is at row 46 and column 1 in 
  995.     the file CALCFUNC.CPP.) 
  996.  
  997.     Start the editor by double-clicking on the error message. 
  998.  
  999.  3. When the editing session has started, note how the editor's cursor is 
  1000.     positioned where the first error occurred. 
  1001.  
  1002. In the steps above, you compiled just one file. If you had changed several C++ 
  1003. files, you could have compiled them in a similar manner by first selecting the 
  1004. files to be compiled and then selecting the compile action. See 
  1005.  
  1006.   objects
  1007.    selecting multiple
  1008.  
  1009. in the operating system's Master Help Index for more information about invoking 
  1010. an action for several objects. 
  1011.  
  1012.  
  1013. ΓòÉΓòÉΓòÉ 5.22. Lesson 17: Fixing the Errors ΓòÉΓòÉΓòÉ
  1014.  
  1015. In this lesson, you will correct the errors introduced to the CALCFUNC.CPP file 
  1016. when the new function was added. The steps illustrate the ease with which you 
  1017. can locate errors and get detailed information about them. 
  1018.  
  1019. To get help on key words using Ctrl+H key sequence, you need to have the IBM 
  1020. Developer's Toolkit product installed. You do not need to be running the 
  1021. WorkFrame/2 product to use this feature. 
  1022.  
  1023.  1. In the last panel, the editor's cursor moved automatically to the beginning 
  1024.     of the 
  1025.  
  1026.         int Sqrt(void);
  1027.  
  1028.     line. 
  1029.  
  1030.  2. Select Describe error... from the editor's Compiler pull down to open the 
  1031.     Describe Error window. 
  1032.  
  1033.     Note that you could use the Compiler pull down to move between the two 
  1034.     errors by selecting Next error or Previous error. The WorkFrame/2 product 
  1035.     also offers an alternative method which will be used shortly. 
  1036.  
  1037.  3. Click on Details to see help for the error message that is selected in the 
  1038.     Describe errors window. 
  1039.  
  1040.  4. Press Esc to close the help window. 
  1041.  
  1042.  5. Click on Cancel (in the Describe Errors window) to return to the editor 
  1043.     session. 
  1044.  
  1045.  6. Put the cursor on the int statement and press Ctrl+H. Help for the int key 
  1046.     word appears. 
  1047.  
  1048.  7. Close the help window. 
  1049.  
  1050.  8. Add a semicolon (';') to the end of the line above to fix the syntax error. 
  1051.     The correct line should look like this: 
  1052.  
  1053.         int Square(void);
  1054.  
  1055.  9. Click on the last error in the monitor window. The editor's cursor now 
  1056.     moves to the beginning of the line 
  1057.  
  1058.                 Rsult *= Result;
  1059.  
  1060.     Correct the second error by changing "Rsult" to "Result". 
  1061.  
  1062.     Note:  The other errors were caused by the missing semicolon and, 
  1063.            therefore, no other fixes need to be made. 
  1064.  
  1065. 10. Select Save and quit from the editor's File pull down to save the file and 
  1066.     exit from the editor. 
  1067.  
  1068. 11. Close the Monitor window. 
  1069.  
  1070.  
  1071. ΓòÉΓòÉΓòÉ 5.23. Lesson 18: Making the Project Again ΓòÉΓòÉΓòÉ
  1072.  
  1073. Now that the errors have been fixed the functions DLL needs to be built again. 
  1074. This time the file compiles correctly. 
  1075.  
  1076.  1. Select ActionsMAKENMake from the pop-up menu of the of the Functions 
  1077.     project to run the make process again. 
  1078.  
  1079.  2. When the process is complete, close the Monitor window. 
  1080.  
  1081. Note that you have started actions from three different WorkFrame/2 objects in 
  1082. this tutorial: 
  1083.  
  1084. o The Command Line Calculator composite project 
  1085.  
  1086. o The CALCFUNC.CPP file 
  1087.  
  1088. o The Functions project. 
  1089.  
  1090.  
  1091. ΓòÉΓòÉΓòÉ 5.24. Lesson 19: Running the Calculator Again ΓòÉΓòÉΓòÉ
  1092.  
  1093. Now that the dynamic link library containing the new square function has been 
  1094. recreated successfully, you can test it. 
  1095.  
  1096. Because you created a new dynamic link library for the calculator's functions, 
  1097. you need to copy it again from drive:\wfv2_directory\PRJ\CLC\DLL directory to 
  1098. the drive:\wfv2_directory\DLL directory before doing the following steps. (As 
  1099. before, drive:\wfv2_directory refers to the directory where the WorkFrame/2 
  1100. product is installed on your computer.) 
  1101.  
  1102.  1. Run the CLC Sample Project again by opening the Command Line Calculator's 
  1103.     system menu and selecting OpenTarget program. 
  1104.  
  1105.  2. This time you see that the "square" function has been added. 
  1106.  
  1107.          ΓòöΓòÉΓòÉΓòÉΓòÉΓòÉΓòÉΓòÉΓòÉΓòÉΓòÉΓòÉΓòÉΓòÉΓòÉΓòÉΓòÉΓòÉΓòÉΓòÉΓòÉΓòÉΓòÉΓòÉΓòÉΓòÉΓòÉΓòÉΓòÉΓòÉΓòÉΓòÉΓòÉΓòÉΓòÉΓòÉΓòÉΓòÉΓòÉΓòÉΓòÉΓòÉΓòÉΓòÉΓòÉΓòÉΓòÉΓòÉΓòÉΓòÉΓòÉΓòÉΓòÉΓòÉΓòÉΓòÉΓòÉΓòÉΓòÉΓòÉΓòÉΓòÉΓòÉΓòÉΓòÉΓòÉΓòÉΓòÉΓòù
  1108.          Γòæ                                                                   Γòæ
  1109.          Γòæ [E:\IBMWF\PRJ\CLC]calc                                            Γòæ
  1110.          Γòæ                                                                   Γòæ
  1111.          Γòæ The Command Line Calculator is starting...                        Γòæ
  1112.          Γòæ                                                                   Γòæ
  1113.          Γòæ Command Summary:                                                  Γòæ
  1114.          Γòæ add     Adds x to result.  Syntax: "add x".                       Γòæ
  1115.          Γòæ div     Divides result by x.  Syntax: "div x".                    Γòæ
  1116.          Γòæ end     Ends CLC.  Syntax: "end".                                 Γòæ
  1117.          Γòæ help    Lists this help.  Syntax: "help".                         Γòæ
  1118.          Γòæ inv     Inverts result.  Syntax: "inv".                           Γòæ
  1119.          Γòæ mult    Multiplies result by x.  Syntax: "mult x".                Γòæ
  1120.          Γòæ rcl     Copies value of register x into result.  Syntax: "rcl x". Γòæ
  1121.          Γòæ regs    Show contents of registers.  Syntax: "regs".              Γòæ
  1122.          Γòæ sqrt    Sets result to its square root.  Syntax "sqrt".           Γòæ
  1123.          Γòæ square  Squares result.  Syntax: "square".                        Γòæ
  1124.          Γòæ stats   Finds average and standard deviation of a set of values.  Γòæ
  1125.          Γòæ         Syntax: "stats".                                          Γòæ
  1126.          Γòæ sto     Copies result into register x.  Syntax: "sto x".          Γòæ
  1127.          Γòæ sub     Subtracts x from result.  Syntax: "sub x".                Γòæ
  1128.          Γòæ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^              Γòæ
  1129.          Γòæ                                                                   Γòæ
  1130.          Γòæ Ready for calculations.                                           Γòæ
  1131.          Γòæ [         0] :>_                                                  Γòæ
  1132.          ΓòÜΓòÉΓòÉΓòÉΓòÉΓòÉΓòÉΓòÉΓòÉΓòÉΓòÉΓòÉΓòÉΓòÉΓòÉΓòÉΓòÉΓòÉΓòÉΓòÉΓòÉΓòÉΓòÉΓòÉΓòÉΓòÉΓòÉΓòÉΓòÉΓòÉΓòÉΓòÉΓòÉΓòÉΓòÉΓòÉΓòÉΓòÉΓòÉΓòÉΓòÉΓòÉΓòÉΓòÉΓòÉΓòÉΓòÉΓòÉΓòÉΓòÉΓòÉΓòÉΓòÉΓòÉΓòÉΓòÉΓòÉΓòÉΓòÉΓòÉΓòÉΓòÉΓòÉΓòÉΓòÉΓòÉΓòÉΓòÉΓò¥
  1133.  
  1134.  3. At the cursor, enter "add 2.3" and then "square" to test the calculator. 
  1135.  
  1136.          Γòæ                                                                   Γòæ
  1137.          Γòæ Ready for calculations.                                           Γòæ
  1138.          Γòæ [         0] :>add 2.3                                            Γòæ
  1139.          Γòæ [       2.3] :>square                                             Γòæ
  1140.          Γòæ [      5.29] :>_                                                  Γòæ
  1141.          ΓòÜΓòÉΓòÉΓòÉΓòÉΓòÉΓòÉΓòÉΓòÉΓòÉΓòÉΓòÉΓòÉΓòÉΓòÉΓòÉΓòÉΓòÉΓòÉΓòÉΓòÉΓòÉΓòÉΓòÉΓòÉΓòÉΓòÉΓòÉΓòÉΓòÉΓòÉΓòÉΓòÉΓòÉΓòÉΓòÉΓòÉΓòÉΓòÉΓòÉΓòÉΓòÉΓòÉΓòÉΓòÉΓòÉΓòÉΓòÉΓòÉΓòÉΓòÉΓòÉΓòÉΓòÉΓòÉΓòÉΓòÉΓòÉΓòÉΓòÉΓòÉΓòÉΓòÉΓòÉΓòÉΓòÉΓòÉΓòÉΓò¥
  1142.  
  1143.  4. Enter "end" to close the calculator. 
  1144.  
  1145.  
  1146. ΓòÉΓòÉΓòÉ 5.25. Lesson 20: Deleting the Project ΓòÉΓòÉΓòÉ
  1147.  
  1148. In this lesson you delete the Command Line Calculator composite project. 
  1149.  
  1150.  1. Drag the Command Line Calculator icon to the Shredder icon. 
  1151.  
  1152.  2. Ensure that the Delete folder contents check box is selected. 
  1153.  
  1154.  3. Confirm the deletion by selecting Yes when the warning message appears. 
  1155.  
  1156. Though you deleted the folder (and its contents), the CLC directory and all of 
  1157. its files still exist. If you also wanted to delete the project's files and 
  1158. directories, you could do so using the operating system's Drives program. 
  1159.  
  1160. Warning: Because the code used in the Functions project is also used by the DLL 
  1161. project of the CLC sample project, do NOT delete any of the directories or 
  1162. source code files. 
  1163.  
  1164.  
  1165. ΓòÉΓòÉΓòÉ 5.26. Summary ΓòÉΓòÉΓòÉ
  1166.  
  1167. This tutorial has guided you through all the major steps of the development 
  1168. process. You should now be able to effectively use the IBM C/C++ Tools compiler 
  1169. within the WorkFrame/2 environment. The WorkFrame/2 product itself offers some 
  1170. other tools and features that could be of interest to you. Use the online help 
  1171. and documentation to familiarize yourself with its other features and increase 
  1172. your productivity. 
  1173.  
  1174. A copy of the original CALCFUNC.CPP file can be found in the DLL subdirectory 
  1175. with the name CALCFUNC.BAK. You may wish to delete CALCFUNC.CPP and then copy 
  1176. CALCFUNC.BAK to CALCFUNC.CPP so that other users will be able to use this 
  1177. tutorial. 
  1178.  
  1179.  
  1180. ΓòÉΓòÉΓòÉ <hidden>  ΓòÉΓòÉΓòÉ
  1181.  
  1182. Trademark of the IBM Corporation.