Introduction

NewBASIC is the name of New Deal, Inc.'s visual builder tool. NewBASIC is designed to rapidly develop applications for New Deal's line of desktop software. NewBASIC provides the following modules:

What's In a NewBASIC Program

A program consists of one or more modules. Each module consists of Components and BASIC code; a module is the smallest unit of a program that may be loaded or unloaded at a time. A typical small NewBASIC program consists of one module. A larger program might consist of one main module that loads other modules during times of need, then unloads them to free the memory they require.

You will use the NewBASIC Builder to create modules. You will create and arrange the module's components and customize it with routines written in a BASIC-like language.

Components

Components are program objects from which you build up your program's User Interface and system communications. If you're familiar with object-oriented programming, you'll feel comfortable with components.

Each component type has three programmable aspects: Properties, Actions, and Events.

Properties are data associated with the component. For example, a button component has a caption property; the caption property specifies which text the button should display. Setting a button's caption to "Cancel" causes the button to display the text "Cancel."

Actions are like messages that your module may send to a component, telling that component to do something. For example, calling a dialog box component's BringToFront() action would cause that dialog box to come to the front. Actions are something that you call using your modules.

Events are the component's way of alerting the module that the component has detected something important happening. For example, a button component generates a _pressed() event when the user clicks it; a power component generates a _wakeUp() event when it detects that the device has turned on. Events cause your program to call module routines. For example, when a user presses a button called CancelButton, then if the module contains a BASIC routine called CancelButton_pressed(), that routine will be called. Note that events are something that you do not initiate yourself.

BASIC code

NewBASIC uses a programming language that strongly resembles BASIC. By writing program routines, you may specify how the module's components work together. The NewBASIC interpreter will begin these routines at appropriate times.

Development Cycle: What You Will Do

We recommend that you follow these steps when beginning to develop a NewBASIC program:

  1. Plan your program's layout and program structure, but don't try to plan everything ahead of time. One of NewBASIC's strengths is that it allows you to change your program easily.
  2. Lay out your program's components. Specify their starting properties to give your program its initial appearance.
  3. Write the BASIC routines which will customize how your program responds to user and system input.
  4. Run your program on the emulator. Use the emulator's debugging functions to find bugs. Fix the bugs. Repeat as necessary.
  5. Build your program for use within New Deal Office.
  6. Celebrate, you've created a NewBASIC program! Take your built version and put it somewhere where your customers may access it.