Home Why Omnibasic Features FAQ Examples
Reviews Keyword/Syntax On-Line Manual Download Manual ScreenShots

Chapter 2

Integrated Development Environment (IDE) Overview

Starting the program

The IDE is designed to be a quick and easy-to-use tool for creating the Graphical User Interface (GUI) for your application. When you start the program it will create four windows.

Control Center

The Control Center appears at the top of your screen. The Control Center is used to set-up your project and enable the various functions of the program.

The top row of the Control Center contains the drop down menu area for the file handling, program viewing, other options and the Help system.

The second row of the Control Center has icons for file handling, printing, compiling and display setup.

The third row of the IDE displays the various objects that can be automatically dispensed onto the development form. Objects can either be dropped onto the development form from this area in a What You See Is What You Get (WYSIWYG) mode, or they can be programmatically entered into the program.

To drop an object on the development form, you double-click on the dispenser button and the object will appear on the upper left hand corner of the form.

Properties Window

The Properties Window displays the default settings that will be used for the object that is currently selected. Selected objects are represented by the four black squares in the corners of the object. If no objects are selected then the Properties Window will display the default properties of the development form window.

The Properties Window shows the default settings that will be used by the object that is shown. The top line is a drop down combo box that shows all of the objects that are on the development form. You can select the object that is being displayed by either clicking upon the object on the development form window or by selecting the object from the drop down list. The following list breaks down the properties of the Properties Window:

Name Shows the name of the object. You can change the name of the object using the Properties Window. When you do change the name the system will verify that the new name is not already used and is not a reserved word.
Object Type Displays what kind of object is being viewed. This field is not editable.
Owner Displays what window the object belongs to. This field is not editable.
Position X Shows the left/right position of the object in number of pixels from the left side of the development form to the left side of the object. On a form object type the position is from the left side of the screen. This can be adjusted by moving the object or changing the displayed value.
Position Y Shows the up/down position of the object in number of pixels from the top of the development form to the upper left corner of the object. On a form object type the position is from the top of the screen. This is for placing the window when the program starts. This can be adjusted by moving the object or changing the displayed value.
Width This item shows the left to right size of the object in pixels. It can be adjusted by changing the value in the Properties Window or by grabbing a handle on the selected object and dragging it left or right to change the width of the object.
Height This item shows the top to bottom size of the object in pixels. It can be adjusted by changing the value in the Properties Window or by grabbing a handle on the selected object and dragging it up or down to change the height of the object.
Visible The Visible property will determine if the default state of the object is visible or invisible. The default setting is only adjustable by setting either True or False into the “visible” window.
Enabled The Enabled property will determine if the object is “grayed-out” as the default setting for the object. The default setting is only adjustable by setting either True or False into the “enabled” window.
Style The Style property allows you to set the default style settings for the object that is selected. The decimal or hexadecimal number displayed in the style window will impact various aspects of a given object. You will need to look at the description for the individual objects to see what property values are available and what they affect on a given object.
BackColor The BackColor property will control the default background color of the selected object. When you click on the button in the BackColor field, the Color Dialog Box will open to allow you to create or select a color that you want to use for the default background color of the object. The resultant number displayed in hexadecimal will be used by the program for the color value.
TextColor The TextColor property will control the default color of the selected object’s text. When you click on the button in the TextColor field, the Color Dialog Box will open to allow you to create or select a color that you want to use for the default color for the text displayed on the object. The resultant number displayed in hexadecimal will be used by the program for the color value.
Text This property will set up the default text that will be displayed on the object.
Font Name/
Font Size
These two properties work together to establish the default font that will be used on the selected object. When you click on the button in the Font Name field, the Font Dialog Box will open to allow you to select the font and the font size that you want to use on the object. When you close the font dialog box the information will be displayed on the Font Name and the Font Size fields of the Properties Window.

Editor Window

The editor window allows the programmer to set up a structured program and will also display the OmniBasic Code that will be generated to create the development form window and the objects on the window.


The editor has a single drop down window that the programmer uses to select what part of the program they want to work on.

You can write unstructured code by choosing Console Project or Graphical Script Project. With this choice all of the program code is available in a single edit window. There is no option for other modules.

You can write structured code by choosing Graphical Project. In a Graphical Project there are five sections to the program:

  1. The first section is a Declaration Module for accepting the dimensioning of variables, defining constants, subroutines and functions.
  2. There is the Construct Module that is read-only and shows the programmer what code will be generated to create the development form and the objects on it.
  3. There is an Initialize Module that is used for the code that may be required to initialize variables and other housekeeping chores when the program starts
  4. The Function Module is where you will want to place Subroutines and Functions.
  5. The final selection is the Event Module that is where the entire object-based event code will be placed.

The editor displays the current cursor position at the top of the program.

Array Editor Window

The array editor is a powerful tool that allows the programmer to place an array of objects on the screen and dynamically adjust the position, size and spacing of the objects. Arrays of objects are useful in cases where there is a grouping of objects that share functionality. For example, if you wanted to create a numeric keypad, you could do that by dropping ten individual buttons onto the development form and then creating event programming for each individual button. With an array of buttons using the array editor you can place all 10 buttons simultaneously and adjust the layout for the buttons as a group. Then you process a single event for all 10 buttons and use the system variable OBSel to determine which button was pressed.

Right-click on the object in the Control Center to access the Array Editor.


In the case of our ten buttons, when you click on Button1(2), you will trigger a Click event for Button1 and then the OBSel system variable will have the number 2 to correspond to the button within the array that was clicked. Example:

You have used the Array editor to create an array of two buttons named Button1. In the Declaration Module you have dimensioned A and B as String variables. In the Event Module of the editor you can create the following Code:

Button1.Click
A=TextField1.Text
B=A+STR$(OBSel)
TextField1.Text=B
EXIT EVENT

The TextField1 will add whatever button was clicked on from the array to the currently displayed text.

When the array editor is active, you can create new arrays by entering a new object name into the Array Name field or you can edit preexisting arrays by typing in the name of the existing array. This feature is like a sharp knife; in the wrong hands it can make a bloody mess, but when used with care it can be an invaluable tool for adjusting the appearance of the program.

Expert Mode

In addition to the ability to compile an OmniBasic project into a fully functional executable program, there is the functionality to create intermediate forms in the output.

To enable this capability, click on the Option menu and select “Expert Mode”. This will enable three additional compile icons on the toolbar. These are:

  1. Compile to CPP
  2. Compile to ASM
  3. Compile to Fcn

The “Compile to CPP” command causes the IDE to create a .cpp file, which is useful to see the code, which OmniBasic has generated at the C level.
The “Compile to ASM” command causes the IDE to create a .s file which is the assembler output stage.
The “Compile to Fcn” command creates a linkable object module (a .o file), which may be linked with other OmniBasic, C, or C++ projects and may be added to a library file (normally a .a file).

With the ability to intermix OmniBasic, C, C++, and assembler code at the Source level as well as the ability to produce the intermediate outputs described above, OmniBasic is unparalleled in its utility to the experienced programmer. Equally unique is the ability to present a simple interface to the beginning programmer or those who simply don’t need the advanced features.

The Option menu also has a “Symbol Table” entry, which, if checked, causes a Symbol Table dump to appear on the Status Window when the compile is complete.

Next Page: Chapter 3
Table of Contents


Home || Why Omnibasic || Features || FAQ || Examples
Reviews || Links || Privacy Statement || Top of Page

 

   Innomation Systems, Inc.

117 Morrison Ave. Morrison, MO 65061 (573) 294-6130

OmniBasic is a trademark of Innomation Systems, Inc., other trademarks are the property of their respective owners.
Innomation Systems, Inc. reserves the right to change prices and specifications without prior notice.
Copyright © 2000, 2001, 2002 Innomation Systems, Inc.