************************************* * * * DB/C Newsletter * * August 1995 * * * ************************************* Editor's Notes I have been wondering why so many people are talking about Microsoft's Visual Basic. One important reason is that Microsoft is heavily promoting Visual Basic with advertising. But I think there are other more technical reasons. People are beginning to realize that C and C++ are not appropriate computer languages for writing business-oriented applications. The old standby for business applications is COBOL, but it is not being seriously considered. Microsoft seems to be ignoring COBOL. COBOL is also closely linked with mainframe computers, which are perceived as dinosaurs. More importantly, most implementations of COBOL do not have decent support for creating GUI programs. (As a matter of fact, most COBOL implementations support only rudimentary character mode user interface operations.) I believe one of the most important reasons people are talking about Visual Basic is that it is more powerful than the 4th generation languages that were supposed to be a panacea for programmers. Visual Basic is a 3rd generation language (oh, horrors!), just like DB/C. 3 GLs put power into the programmers hands instead of tying them. When used in conjunction with code generators and libraries of supporting code, programming with a 3 GL is hard to beat for functionality, ease of maintenance and performance. The bottom line is this: before you dive into a 4 GL swamp, reconsider proven 3 GL languages like DB/C and Visual Basic. As long as they continue to be updated with new features necessary to make modern programs, 3 GLs will continue to be productive tools to help you create successful applications. This month's article describes the Fast Development Environment of DB/C 9. This article was especially hard to write, because it is not easy to describe graphical objects in a text based newsletter. If you have a beta copy of DB/C 9, it's probably easier just to launch FDE and try out all of the features. If not, hopefully this article will give you a sense of what FDE is capable of. don.wills@swc.com The DB/C 9 Fast Development Environment The Fast Development Environment (FDE) is an integrated development tool that is used to create and test DB/C programs. FDE is a graphical user interface (GUI) program. It is used to create and test either GUI or character mode DB/C programs. FDE provides these functions: text editor, dialog/panel editor, menu editor, icon painter, DB/C language compiler, and run-time with debugger. The text editor allows for editing of a text file in a window. Multiple text files may be editted in separate windows. Here is a list of some of the features of the text editor: edit undo text selection using the mouse or find copy, cut and paste using the system clipboard sophisticated find and replace tab support including block shift left/right bookmarks for quick navigation of text file lines with compiler errors are marked with error tags support for several types of text files most recent file backup on save configuration of special keys The dialog/panel editor is a visual painter that allows the user to specify the location and function of controls within a dialog or panel. All DB/C controls are supported, including check boxes, radio buttons, push buttons, boxes, icons, static text, variable text, edit boxes, multi-line edit boxes, list boxes, drop boxes, slider bars, and progress indicator bars. Here is a list of some of the features of the dialog/panel editor: add, delete and move controls copy, cut and paste using the system clipboard single or group selection of controls double click to modify control attributes snap to grid support of control location layout control including centering, alignment, spacing and size easy changing of logical ordering of controls (tab key order) The menu editor allows the user to specify the details of a menu resource. The menu editor consists of three list boxes that are used to navigate the list of main menu entries, along with each associated list of submenu entries. Support for copy, cut and paste using the system clipboard allows for easy manipulation of a menu entry and all of its associated submenus. The icon editor is a visual painter that allows the user to paint an icon. The copy and paste functions using the system clipboard allow icons to be copied to and from other applications that support bitmap operations of the clipboard. The icon editor supports various size icons. Color support includes black and white icons, 8 color icons and full color (24 bit) icons. In FDE, DB/C programs are grouped together as part of an application. When FDE is running, the main window contains a list box that has a list of all of the programs that are part of an application. Only one application can be active at a time. An application is created with the New Application menu item of the FDE main window. An existing application is opened with the Open Application menu item of the FDE main window. An application is saved and closed with the Save, Save As and Close menu items of the FDE main window. Programs are added and deleted from an application using the Add Program and Remove Program buttons of the FDE main window. A single program can be compiled by selecting that program in the list box of the FDE main window and the choosing the Compile menu item. All programs are compiled with the Compile All menu item. The Compile Changed menu item compiles only those programs that have changed or whose include files have changed. For each application, the FDE maintains a program dictionary that contains information about which files are included in which source programs and files. Whenever a change is made to any text file using the text editor that is part of FDE, the program dictionary is updated to reflect the modification. The program dictionary is also updated with the Update Dependencies menu item. This is used when source files are changed outside of FDE. When a program compiles unsuccessfully, the error messages are displayed in a separate window. Double clicking on an error message causes the text editor to open the text file that contains the error and to position the cursor at the offending line. The Goto Next Error and Goto Previous Error menu items of the text window cause the cursor to be moved to the line containing the next or previous compiler error. If this happens to be in another file, then a text window is created containing that file. A program that compiles successfully is tested with the Run menu item. This starts the run-time debugger. The main debugger window will display the source program that is to be tested, along with a menu and tool bar. The tool bar contains buttons that do these functions: Go Step Step Over Step Out Break Find Find Again Up Stack Down Stack The menu of the main debugger window offers these additional functions: Save Globals Restore Globals Clear Globals Preferences Save Preferences Slow Execution Change Source File Change Module Find Label Goto Line Number Alter Flags Display Variable View Variable Remove View Variable Modify Variable There are two additional debug windows that are optionally displayed. These are the View Variable window and the Results window. The View Variable window displays the variables that are currently being viewed. The Results window displays the results of the various functions like Display Variable. FDE provides many of the tools needed to easily create GUI programs. It also provides an easy-to-use debugger that works well for both character mode and GUI programs. It is an important part of the upcoming release of DB/C. DB/C Class Schedule The next DB/C class is not yet scheduled.