Concept : Understanding Bungee Logic

Page Status: Beta

Back to Concepts and HOW TOs


[edit] Description

Programming in Bungee is similar to other Object Oriented C-family programming languages, but with some unique properties. Bungee Logic (part of the Model) supports:

  • Simplified syntax:
    • There are only thirteen straight-forward statements that make up all programming logic.
    • There are no subtle syntactic hurdles to master as with other languages.
  • Statement properties:
    • The detailed properties of each statement can be visually edited in the Property Editor. For example, an assignment provides you the option to choose copy by reference or by copy by value.
    • Also, default values are set visually on the declaration of a new variable in the Design Editor, including all primitive types, objects, and even collections.
  • Error handling:
    • You simply add an OnError statement to any code block or function to catch any errors that may occur.

[edit] Using the Design Editor

The Bungee Builder Design Editor currently sports a tree-like interface with the ability to drag-and-drop functions, fields, variables and statements into the code.
Code blocks can be rearranged by dragging them to another valid scope. Duplication is done by simply holding down Control then dragging and dropping a code block.
Elements are removed by selecting them and pressing the Delete key. There currently is not an undo operation, so saving often is recommended.

[edit] Schema

Bungee Logic is built from some simple building blocks that should look familiar:

[edit] Statements

Statements add the logic and control flow to classes:

[edit] Interacting with Controls from Code

In traditional GUI systems, controls such as text boxes are manipulated directly as object members in a form class.

In Bungee however, a control becomes a "description" or part of the definition of the form (part of the View), and not directly accessible from the code. Instead, control properties (such as the disable state), are manipulated through the field to which the control is bound to using the State property of the field. For example, a text box that is bound to a string field can be disabled (made not clickable) by setting the State.Enable property on the field to false.

There is another way to manipulate controls that are bound to the Model using an adapter, which is to modify the connection object that the control is associated with. See Understanding the Model View Adapter Pattern for more information on this topic.

[edit] See Also

Working with Bungee Logic
Building a Bungee-powered Application

[edit] Tags

Log in if you would like to rate this page.
    Copyright © 2005 - 2007 Bungee Labs. All rights reserved.